import heapq




def 				_snake_case     (       lowerCAmelCase							:       Optional[int]       ,			lowerCAmelCase							:       str       ,			lowerCAmelCase							:       int     ):
		"""simple docstring"""







		SCREAMING_SNAKE_CASE_  :		Union[str, Any]    				=   [(0, start)]  # cost from start node,end node
		SCREAMING_SNAKE_CASE_  :		str    				=   set()
		while heap:
				((SCREAMING_SNAKE_CASE_)				,   (SCREAMING_SNAKE_CASE_))  :		List[str]    				=   heapq.heappop(lowerCAmelCase     )
				if u in visited:
						continue
				visited.add(lowerCAmelCase     )
				if u == end:
						return cost
				for v, c in graph[u]:
						if v in visited:
								continue
						SCREAMING_SNAKE_CASE_  :		Union[str, Any]    				=   cost + c
						heapq.heappush(lowerCAmelCase       ,			(next_item, v)     )
		return -1


__lowerCamelCase :     List[Any]          =  {
    '''A''': [['''B''', 2], ['''C''', 5]],
    '''B''': [['''A''', 2], ['''D''', 3], ['''E''', 1], ['''F''', 1]],
    '''C''': [['''A''', 5], ['''F''', 3]],
    '''D''': [['''B''', 3]],
    '''E''': [['''B''', 4], ['''F''', 3]],
    '''F''': [['''C''', 3], ['''E''', 3]],
}
__lowerCamelCase :     Union[str, Any]          =  {
    '''B''': [['''C''', 1]],
    '''C''': [['''D''', 1]],
    '''D''': [['''F''', 1]],
    '''E''': [['''B''', 1], ['''F''', 3]],
    '''F''': [],
}
__lowerCamelCase :     List[str]          =  {
    '''B''': [['''C''', 1]],
    '''C''': [['''D''', 1]],
    '''D''': [['''F''', 1]],
    '''E''': [['''B''', 1], ['''G''', 2]],
    '''F''': [],
    '''G''': [['''F''', 1]],
}

__lowerCamelCase :     Optional[int]          =  dijkstra(G, '''E''', '''C''')
print(short_distance)  # E -- 3 --> F -- 3 --> C == 6

__lowerCamelCase :     List[Any]          =  dijkstra(Ga, '''E''', '''F''')
print(short_distance)  # E -- 3 --> F == 3

__lowerCamelCase :     str          =  dijkstra(Ga, '''E''', '''F''')
print(short_distance)  # E -- 2 --> G -- 1 --> F == 3

if __name__ == "__main__":
		import doctest

		doctest.testmod()

import argparse

from transformers import ConvBertConfig, ConvBertModel, TFConvBertModel, load_tf_weights_in_convbert
from transformers.utils import logging


logging.set_verbosity_info()




def 				_snake_case     (       lowerCAmelCase							:       Dict       ,			lowerCAmelCase							:       int       ,			lowerCAmelCase							:       Union[str, Any]     ):
		"""simple docstring"""







		SCREAMING_SNAKE_CASE_  :		List[Any]    				=   ConvBertConfig.from_json_file(lowerCAmelCase     )
		SCREAMING_SNAKE_CASE_  :		Tuple    				=   ConvBertModel(lowerCAmelCase     )

		SCREAMING_SNAKE_CASE_  :		Dict    				=   load_tf_weights_in_convbert(lowerCAmelCase       ,			lowerCAmelCase       ,			lowerCAmelCase     )
		model.save_pretrained(lowerCAmelCase     )

		SCREAMING_SNAKE_CASE_  :		Union[str, Any]    				=   TFConvBertModel.from_pretrained(lowerCAmelCase       ,			from_pt=lowerCAmelCase     )
		tf_model.save_pretrained(lowerCAmelCase     )


if __name__ == "__main__":
		__lowerCamelCase :     Optional[Any]          =  argparse.ArgumentParser()
		# Required parameters
		parser.add_argument(
		    '''--tf_checkpoint_path''', default=None, type=str, required=True, help='''Path to the TensorFlow checkpoint path.'''
		)
		parser.add_argument(
		    '''--convbert_config_file''',
		    default=None,
		    type=str,
		    required=True,
		    help=(
		        '''The config json file corresponding to the pre-trained ConvBERT model. \n'''
		        '''This specifies the model architecture.'''
		    ),
		)
		parser.add_argument(
		    '''--pytorch_dump_path''', default=None, type=str, required=True, help='''Path to the output PyTorch model.'''
		)
		__lowerCamelCase :     Optional[int]          =  parser.parse_args()
		convert_orig_tfa_checkpoint_to_pytorch(args.tf_checkpoint_path, args.convbert_config_file, args.pytorch_dump_path)
