code: 
  """simple docstring"""
  from __future__ import annotations
  
  import unittest
  
  from transformers import AutoTokenizer, GPTJConfig, is_tf_available
  from transformers.testing_utils import require_tf, slow, tooslow
  
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_tf_common import TFModelTesterMixin, ids_tensor, random_attention_mask
  from ...test_pipeline_mixin import PipelineTesterMixin
  from ...utils.test_modeling_tf_core import TFCoreModelTesterMixin
  
  
  if is_tf_available():
  			import tensorflow as tf
  
  			from transformers.models.gptj.modeling_tf_gptj import (
  			    TFGPTJForCausalLM,
  			    TFGPTJForQuestionAnswering,
  			    TFGPTJForSequenceClassification,
  			    TFGPTJModel,
  			    shape_list,
  			)
  
  
  class    _lowerCAmelCase						:
  
  
  
  							def __init__(      self ,						a_   )							->							str:
  								_UpperCAmelCase =						parent
  								_UpperCAmelCase =						13
  								_UpperCAmelCase =						7
  								_UpperCAmelCase =						True
  								_UpperCAmelCase =						True
  								_UpperCAmelCase =						True
  								_UpperCAmelCase =						True
  								_UpperCAmelCase =						True
  								_UpperCAmelCase =						99
  								_UpperCAmelCase =						32
  								_UpperCAmelCase =						4
  								_UpperCAmelCase =						2
  								_UpperCAmelCase =						4
  								_UpperCAmelCase =						37
  								_UpperCAmelCase =						"gelu"
  								_UpperCAmelCase =						0.1
  								_UpperCAmelCase =						0.1
  								_UpperCAmelCase =						512
  								_UpperCAmelCase =						16
  								_UpperCAmelCase =						2
  								_UpperCAmelCase =						0.02
  								_UpperCAmelCase =						3
  								_UpperCAmelCase =						4
  								_UpperCAmelCase =						None
  								_UpperCAmelCase =						self.vocab_size - 1
  								_UpperCAmelCase =						self.vocab_size - 1
  								_UpperCAmelCase =						self.vocab_size - 1
  
  
  
  							def       _a   (      self   )							->							Optional[Any]:
  								_UpperCAmelCase =						ids_tensor([self.batch_size, self.seq_length] ,						self.vocab_size   )
  
  								_UpperCAmelCase =						None
  								if self.use_input_mask:
  									_UpperCAmelCase =						random_attention_mask([self.batch_size, self.seq_length]   )
  
  								_UpperCAmelCase =						None
  								if self.use_token_type_ids:
  									_UpperCAmelCase =						ids_tensor([self.batch_size, self.seq_length] ,						self.type_vocab_size   )
  
  								_UpperCAmelCase =						None
  								if self.use_mc_token_ids:
  									_UpperCAmelCase =						ids_tensor([self.batch_size, self.num_choices] ,						self.seq_length   )
  
  								_UpperCAmelCase =						None
  								_UpperCAmelCase =						None
  								_UpperCAmelCase =						None
  								if self.use_labels:
  									_UpperCAmelCase =						ids_tensor([self.batch_size] ,						self.type_sequence_label_size   )
  									_UpperCAmelCase =						ids_tensor([self.batch_size, self.seq_length] ,						self.num_labels   )
  									_UpperCAmelCase =						ids_tensor([self.batch_size] ,						self.num_choices   )
  
  								_UpperCAmelCase =						GPTJConfig(
  								    vocab_size=self.vocab_size ,						n_embd=self.hidden_size ,						n_layer=self.num_hidden_layers ,						n_head=self.num_attention_heads ,						intermediate_size=self.intermediate_size ,						hidden_act=self.hidden_act ,						hidden_dropout_prob=self.hidden_dropout_prob ,						attention_probs_dropout_prob=self.attention_probs_dropout_prob ,						n_positions=self.max_position_embeddings ,						type_vocab_size=self.type_vocab_size ,						initializer_range=self.initializer_range ,						bos_token_id=self.bos_token_id ,						eos_token_id=self.eos_token_id ,						pad_token_id=self.pad_token_id ,						rotary_dim=self.rotary_dim ,						return_dict=a_ ,						)
  
  								_UpperCAmelCase =						ids_tensor([self.num_hidden_layers, self.num_attention_heads] ,						2   )
  
  								return (
  								    config,
  								    input_ids,
  								    input_mask,
  								    head_mask,
  								    token_type_ids,
  								    mc_token_ids,
  								    sequence_labels,
  								    token_labels,
  								    choice_labels,
  								)
  
  
  
  							def       _a   (      self ,						a_ ,						a_ ,						a_ ,						a_ ,						a_ ,						*a_   )							->							List[Any]:
  								_UpperCAmelCase =						TFGPTJModel(config=a_   )
  								_UpperCAmelCase =						{
  								    "input_ids": input_ids,
  								    "attention_mask": input_mask,
  								    "token_type_ids": token_type_ids,
  								}
  								_UpperCAmelCase =						model(a_   )
  
  								_UpperCAmelCase =						[input_ids, None, input_mask]  # None is the input for 'past'
  								_UpperCAmelCase =						model(a_   )
  
  								_UpperCAmelCase =						model(a_   )
  
  								self.parent.assertEqual(result.last_hidden_state.shape ,						(self.batch_size, self.seq_length, self.hidden_size)   )
  
  
  
  							def       _a   (      self ,						a_ ,						a_ ,						a_ ,						a_ ,						a_ ,						*a_   )							->							List[str]:
  								_UpperCAmelCase =						TFGPTJModel(config=a_   )
  
  								# first forward pass
  								_UpperCAmelCase =						model(a_ ,						token_type_ids=a_ ,						use_cache=a_   )
  								_UpperCAmelCase =						model(a_ ,						token_type_ids=a_   )
  								_UpperCAmelCase =						model(a_ ,						token_type_ids=a_ ,						use_cache=a_   )
  
  								self.parent.assertTrue(len(a_   ) == len(a_   )   )
  								self.parent.assertTrue(len(a_   ) == len(a_   ) + 1   )
  
  								_UpperCAmelCase ,      _UpperCAmelCase =						outputs.to_tuple()
  
  								# create hypothetical next token and extent to next_input_ids
  								_UpperCAmelCase =						ids_tensor((self.batch_size, 1) ,						config.vocab_size   )
  								_UpperCAmelCase =						ids_tensor([self.batch_size, 1] ,						self.type_vocab_size   )
  
  								# append to next input_ids and token_type_ids
  								_UpperCAmelCase =						tf.concat([input_ids, next_tokens] ,						axis=-1   )
  								_UpperCAmelCase =						tf.concat([token_type_ids, next_token_types] ,						axis=-1   )
  
  								_UpperCAmelCase =						model(a_ ,						token_type_ids=a_   )["last_hidden_state"]
  								_UpperCAmelCase =						model(a_ ,						token_type_ids=a_ ,						past_key_values=a_   )[
  								    "last_hidden_state"
  								]
  
  								# select random slice
  								_UpperCAmelCase =						int(ids_tensor((1,) ,						shape_list(a_   )[-1]   )   )
  								_UpperCAmelCase =						output_from_no_past[:, -1, random_slice_idx]
  								_UpperCAmelCase =						output_from_past[:, 0, random_slice_idx]
  
  								# test that outputs are equal for slice
  								tf.debugging.assert_near(a_ ,						a_ ,						rtol=1e-6   )
  
  
  
  							def       _a   (      self ,						a_ ,						a_ ,						a_ ,						a_ ,						a_ ,						*a_   )							->							Union[str, Any]:
  								_UpperCAmelCase =						TFGPTJModel(config=a_   )
  
  								# create attention mask
  								_UpperCAmelCase =						self.seq_length // 2
  								_UpperCAmelCase =						tf.ones((self.batch_size, half_seq_length) ,						dtype=tf.intaa   )
  								_UpperCAmelCase =						tf.zeros((self.batch_size, self.seq_length - half_seq_length) ,						dtype=tf.intaa   )
  								_UpperCAmelCase =						tf.concat([attn_mask_begin, attn_mask_end] ,						axis=1   )
  
  								# first forward pass
  								_UpperCAmelCase ,      _UpperCAmelCase =						model(a_ ,						attention_mask=a_   ).to_tuple()
  
  								# create hypothetical next token and extent to next_input_ids
  								_UpperCAmelCase =						ids_tensor((self.batch_size, 1) ,						config.vocab_size   )
  
  								# change a random masked slice from input_ids
  								_UpperCAmelCase =						ids_tensor((1,) ,						a_   ).numpy() + 1
  								_UpperCAmelCase =						ids_tensor((self.batch_size, self.seq_length) ,						config.vocab_size   )
  								_UpperCAmelCase =						tf.range(self.seq_length   ) == (self.seq_length - random_seq_idx_to_change)
  								_UpperCAmelCase =						tf.transpose(
  								    tf.broadcast_to(tf.expand_dims(a_ ,						-1   ) ,						(self.seq_length, self.batch_size)   )   )
  								_UpperCAmelCase =						tf.where(a_ ,						a_ ,						a_   )
  
  								# append to next input_ids and attn_mask
  								_UpperCAmelCase =						tf.concat([input_ids, next_tokens] ,						axis=-1   )
  								_UpperCAmelCase =						tf.concat([attn_mask, tf.ones((shape_list(a_   )[0], 1) ,						dtype=tf.intaa   )] ,						axis=1   )
  
  								# get two different outputs
  								_UpperCAmelCase =						model(a_ ,						attention_mask=a_   )["last_hidden_state"]
  								_UpperCAmelCase =						model(a_ ,						past_key_values=a_ ,						attention_mask=a_   )[
  								    "last_hidden_state"
  								]
  
  								# select random slice
  								_UpperCAmelCase =						int(ids_tensor((1,) ,						shape_list(a_   )[-1]   )   )
  								_UpperCAmelCase =						output_from_no_past[:, -1, random_slice_idx]
  								_UpperCAmelCase =						output_from_past[:, 0, random_slice_idx]
  
  								# test that outputs are equal for slice
  								tf.debugging.assert_near(a_ ,						a_ ,						rtol=1e-12   )
  
  
  
  							def       _a   (      self ,						a_ ,						a_ ,						a_ ,						a_ ,						a_ ,						*a_   )							->							Optional[Any]:
  								_UpperCAmelCase =						TFGPTJModel(config=a_   )
  
  								_UpperCAmelCase =						input_ids[:1, :]
  								_UpperCAmelCase =						input_mask[:1, :]
  								_UpperCAmelCase =						token_type_ids[:1, :]
  								_UpperCAmelCase =						1
  
  								# first forward pass
  								_UpperCAmelCase =						model(a_ ,						attention_mask=a_ ,						token_type_ids=a_ ,						use_cache=a_   )
  
  								_UpperCAmelCase ,      _UpperCAmelCase =						outputs.to_tuple()
  
  								# create hypothetical next token and extent to next_input_ids
  								_UpperCAmelCase =						ids_tensor((self.batch_size, 3) ,						config.vocab_size   )
  								_UpperCAmelCase =						ids_tensor((self.batch_size, 3) ,						2   )
  								_UpperCAmelCase =						ids_tensor((self.batch_size, 3) ,						self.type_vocab_size   )
  
  								# append to next input_ids and token_type_ids
  								_UpperCAmelCase =						tf.concat([input_ids, next_tokens] ,						axis=-1   )
  								_UpperCAmelCase =						tf.concat([input_mask, next_attn_mask] ,						axis=-1   )
  								_UpperCAmelCase =						tf.concat([token_type_ids, next_token_types] ,						axis=-1   )
  
  								_UpperCAmelCase =						model(
  								    a_ ,						token_type_ids=a_ ,						attention_mask=a_   )["last_hidden_state"]
  								_UpperCAmelCase =						model(
  								    a_ ,						token_type_ids=a_ ,						attention_mask=a_ ,						past_key_values=a_ ,						)["last_hidden_state"]
  								self.parent.assertTrue(output_from_past.shape[1] == next_tokens.shape[1]   )
  
  								# select random slice
  								_UpperCAmelCase =						int(ids_tensor((1,) ,						shape_list(a_   )[-1]   )   )
  								_UpperCAmelCase =						output_from_no_past[:, -3:, random_slice_idx]
  								_UpperCAmelCase =						output_from_past[:, :, random_slice_idx]
  
  								# test that outputs are equal for slice
  								tf.debugging.assert_near(a_ ,						a_ ,						rtol=1e-3   )
  
  
  
  							def       _a   (      self ,						a_ ,						a_ ,						a_ ,						a_ ,						a_ ,						*a_   )							->							Optional[Any]:
  								_UpperCAmelCase =						TFGPTJForCausalLM(config=a_   )
  								_UpperCAmelCase =						{
  								    "input_ids": input_ids,
  								    "attention_mask": input_mask,
  								    "token_type_ids": token_type_ids,
  								}
  								_UpperCAmelCase =						model(a_   )
  								self.parent.assertEqual(result.logits.shape ,						(self.batch_size, self.seq_length, self.vocab_size)   )
  
  
  
  							def       _a   (      self   )							->							int:
  								_UpperCAmelCase =						self.prepare_config_and_inputs()
  
  								(
  								    (
  								    _UpperCAmelCase      
  								) ,      (
  								    _UpperCAmelCase      
  								) ,      (
  								    _UpperCAmelCase      
  								) ,      (
  								    _UpperCAmelCase      
  								) ,      (
  								    _UpperCAmelCase      
  								) ,      (
  								    _UpperCAmelCase      
  								) ,      (
  								    _UpperCAmelCase      
  								) ,      (
  								    _UpperCAmelCase      
  								) ,      (
  								    _UpperCAmelCase      
  								) ,            
  								) =						config_and_inputs
  
  								_UpperCAmelCase =						{
  								    "input_ids": input_ids,
  								    "token_type_ids": token_type_ids,
  								    "attention_mask": input_mask,
  								}
  								return config, inputs_dict
  
  
  
  
  
  @require_tf
  class    _lowerCAmelCase						(						lowerCamelCase    ,       lowerCamelCase    ,       lowerCamelCase    ,       unittest.TestCase						):
  							lowercase_     :     List[Any]       =							(
  							    (TFGPTJForCausalLM, TFGPTJForSequenceClassification, TFGPTJForQuestionAnswering, TFGPTJModel)
  							    if is_tf_available()
  							    else ()
  							)
  
  							lowercase_     :     int       =							(TFGPTJForCausalLM,) if is_tf_available() else ()
  							lowercase_     :     Optional[Any]       =							(
  							    {
  							        '''feature-extraction''': TFGPTJModel,
  							        '''question-answering''': TFGPTJForQuestionAnswering,
  							        '''text-classification''': TFGPTJForSequenceClassification,
  							        '''text-generation''': TFGPTJForCausalLM,
  							        '''zero-shot''': TFGPTJForSequenceClassification,
  							    }
  							    if is_tf_available()
  							    else {}
  							)
  							lowercase_     :     Dict       =							False
  							lowercase_     :     Optional[int]       =							False
  							lowercase_     :     List[Any]       =							False
  							lowercase_     :     List[str]       =							False
  
  
  
  							def       _a   (      self ,						a_ ,						a_ ,						a_ ,						a_ ,						a_   )							->							List[str]:
  								if (
  								    pipeline_test_casse_name == "QAPipelineTests"
  								    and tokenizer_name is not None
  								    and not tokenizer_name.endswith("Fast"   )
  								):
  									# `QAPipelineTests` fails for a few models when the slower tokenizer are used.
  									# (The slower tokenizers were never used for pipeline tests before the pipeline testing rework)
  									# TODO: check (and possibly fix) the `QAPipelineTests` with slower tokenizer
  									return True
  
  								return False
  
  
  
  							def       _a   (      self   )							->							str:
  								_UpperCAmelCase =						TFGPTJModelTester(self   )
  								_UpperCAmelCase =						ConfigTester(self ,						config_class=a_ ,						n_embd=37   )
  
  
  
  							def       _a   (      self   )							->							Any:
  								self.config_tester.run_common_tests()
  
  
  
  							def       _a   (      self   )							->							Union[str, Any]:
  								_UpperCAmelCase =						self.model_tester.prepare_config_and_inputs()
  								self.model_tester.create_and_check_gptj_model(*a_   )
  
  
  
  							def       _a   (      self   )							->							List[Any]:
  								_UpperCAmelCase =						self.model_tester.prepare_config_and_inputs()
  								self.model_tester.create_and_check_gptj_model_past(*a_   )
  
  
  
  							def       _a   (      self   )							->							Optional[Any]:
  								_UpperCAmelCase =						self.model_tester.prepare_config_and_inputs()
  								self.model_tester.create_and_check_gptj_model_attention_mask_past(*a_   )
  
  
  
  							def       _a   (      self   )							->							List[str]:
  								_UpperCAmelCase =						self.model_tester.prepare_config_and_inputs()
  								self.model_tester.create_and_check_gptj_model_past_large_inputs(*a_   )
  
  
  
  							def       _a   (      self   )							->							int:
  								_UpperCAmelCase =						self.model_tester.prepare_config_and_inputs()
  								self.model_tester.create_and_check_gptj_lm_head_model(*a_   )
  
  
  
  							@slow
  							@unittest.skipIf(
  							    not is_tf_available() or len(tf.config.list_physical_devices("GPU"   )   ) > 0 ,						"skip testing on GPU for now to avoid GPU OOM." ,						)
  							def       _a   (      self   )							->							Optional[Any]:
  								_UpperCAmelCase =						TFGPTJModel.from_pretrained("EleutherAI/gpt-j-6B" ,						from_pt=a_   )
  								self.assertIsNotNone(a_   )
  
  
  
  							@unittest.skip(reason="Currently, model embeddings are going to undergo a major refactor."   )
  							def       _a   (      self   )							->							str:
  								super().test_resize_token_embeddings()
  
  
  
  
  
  @require_tf
  @tooslow
  # Marked as @tooslow due to GPU OOM -- but still useful to run locally. Requires ~39GB of RAM.
  class    _lowerCAmelCase						(						unittest.TestCase						):
  
  
  
  							def       _a   (      self   )							->							Tuple:
  								_UpperCAmelCase =						TFGPTJForCausalLM.from_pretrained("EleutherAI/gpt-j-6B" ,						from_pt=a_   )
  								_UpperCAmelCase =						tf.convert_to_tensor([[464, 3290]] ,						dtype=tf.intaa   )  # The dog
  								# fmt: off
  								# The dog is a man's best friend. It is a loyal companion, and it is a friend
  								_UpperCAmelCase =						[464, 3290, 318, 257, 582, 338, 1266, 1545, 13, 632, 318, 257, 9112, 15185, 11, 290, 340, 318, 257, 1545]
  								# fmt: on
  								_UpperCAmelCase =						model.generate(a_ ,						do_sample=a_   )
  								self.assertListEqual(output_ids[0].numpy().tolist() ,						a_   )
  
  
  
  							def       _a   (      self   )							->							Dict:
  								_UpperCAmelCase =						AutoTokenizer.from_pretrained("EleutherAI/gpt-j-6B" ,						revision="float16"   )
  								_UpperCAmelCase =						TFGPTJForCausalLM.from_pretrained("EleutherAI/gpt-j-6B" ,						revision="float16" ,						from_pt=a_   )
  
  								_UpperCAmelCase =						tokenizer("Today is a nice day and" ,						return_tensors="tf"   )
  								# forces the generation to happen on CPU, to avoid GPU-related quirks
  								with tf.device(":/CPU:0"   ):
  									_UpperCAmelCase =						model.generate(**a_ ,						do_sample=a_ ,						seed=[42, 0]   )
  								_UpperCAmelCase =						tokenizer.decode(output_ids[0] ,						skip_special_tokens=a_   )
  
  								_UpperCAmelCase =						"Today is a nice day and I’m going to go for a walk. I’"
  								self.assertEqual(a_ ,						a_   )
  
  
  
  							def       _a   (      self   )							->							int:
  								_UpperCAmelCase =						TFGPTJForCausalLM.from_pretrained("EleutherAI/gpt-j-6B" ,						revision="float16" ,						from_pt=a_   )
  								_UpperCAmelCase =						AutoTokenizer.from_pretrained("EleutherAI/gpt-j-6B" ,						revision="float16"   )
  
  								_UpperCAmelCase =						"left"
  
  								# Define PAD Token = EOS Token = 50256
  								_UpperCAmelCase =						tokenizer.eos_token
  								_UpperCAmelCase =						model.config.eos_token_id
  
  								# use different length sentences to test batching
  								_UpperCAmelCase =						[
  								    "Hello, my dog is a little",
  								    "Today, I",
  								]
  								_UpperCAmelCase =						[
  								    "Hello, my dog is a little over a year old and has been diagnosed with hip dysplasia",
  								    "Today, I’m going to be talking about a topic that’",
  								]
  								return model, tokenizer, sentences, expected_output_sentences
  
  
  
  							def       _a   (      self   )							->							Optional[Any]:
  								# Confirms that we get the expected results with left-padded beam search
  								_UpperCAmelCase ,      _UpperCAmelCase ,      _UpperCAmelCase ,      _UpperCAmelCase =						self._get_beam_search_test_objects()
  
  								_UpperCAmelCase =						tokenizer(a_ ,						return_tensors="tf" ,						padding=a_   )
  								_UpperCAmelCase =						model.generate(**a_ ,						do_sample=a_ ,						num_beams=2   )
  								_UpperCAmelCase =						tokenizer.batch_decode(a_ ,						skip_special_tokens=a_   )
  								self.assertListEqual(a_ ,						a_   )
  
  
  
  							def       _a   (      self   )							->							List[str]:
  								# Confirms that left-padding is working properly
  								_UpperCAmelCase ,      _UpperCAmelCase ,      _UpperCAmelCase ,      _UpperCAmelCase =						self._get_beam_search_test_objects()
  
  								_UpperCAmelCase =						tokenizer(a_ ,						return_tensors="tf" ,						padding=a_   )
  								_UpperCAmelCase =						tokenizer(sentences[0] ,						return_tensors="tf"   )
  								_UpperCAmelCase =						model.generate(**a_ ,						do_sample=a_ ,						num_beams=2   )
  								_UpperCAmelCase =						(
  								    shape_list(inputs_non_padded["input_ids"]   )[-1]
  								    - tf.reduce_sum(tf.cast(inputs["attention_mask"][-1] ,						tf.intaa   )   ).numpy()
  								)
  								_UpperCAmelCase =						tokenizer(sentences[1] ,						return_tensors="tf"   )
  								_UpperCAmelCase =						model.generate(
  								    **a_ ,						do_sample=a_ ,						num_beams=2 ,						max_length=model.config.max_length - num_paddings   )
  								_UpperCAmelCase =						tokenizer.decode(output_non_padded[0] ,						skip_special_tokens=a_   )
  								_UpperCAmelCase =						tokenizer.decode(output_padded[0] ,						skip_special_tokens=a_   )
  								self.assertListEqual(a_ ,						[non_padded_sentence, padded_sentence]   )
  
  
  
  							def       _a   (      self   )							->							str:
  								# Confirms that XLA is working properly
  								_UpperCAmelCase ,      _UpperCAmelCase ,      _UpperCAmelCase ,      _UpperCAmelCase =						self._get_beam_search_test_objects()
  
  								_UpperCAmelCase =						tokenizer(a_ ,						return_tensors="tf" ,						padding=a_   )
  								_UpperCAmelCase =						tf.function(model.generate ,						jit_compile=a_   )
  								_UpperCAmelCase =						xla_generate(**a_ ,						do_sample=a_ ,						num_beams=2   )
  								_UpperCAmelCase =						tokenizer.batch_decode(a_ ,						skip_special_tokens=a_   )
  								self.assertListEqual(a_ ,						a_   )
  
  
  
  
style_context: 
  """simple docstring"""
  import heapq
  
  
  
  
  def     __lowerCamelCase  (		UpperCamelCase__				,     UpperCamelCase__				,     UpperCamelCase__      ):
  
  
  	"""simple docstring"""
  
  
  
  
  
  
  	_UpperCAmelCase =						[(0, start)]  # cost from start node,end node
  	_UpperCAmelCase =						set()
  	while heap:
  		((_UpperCAmelCase) ,      (_UpperCAmelCase)) =						heapq.heappop(UpperCamelCase__      )
  		if u in visited:
  			continue
  		visited.add(UpperCamelCase__      )
  		if u == end:
  			return cost
  		for v, c in graph[u]:
  			if v in visited:
  				continue
  			_UpperCAmelCase =						cost + c
  			heapq.heappush(UpperCamelCase__				,     (next_item, v)      )
  	return -1
  
  
  __magic_name__		       =				{
      '''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]],
  }
  __magic_name__		       =				{
      '''B''': [['''C''', 1]],
      '''C''': [['''D''', 1]],
      '''D''': [['''F''', 1]],
      '''E''': [['''B''', 1], ['''F''', 3]],
      '''F''': [],
  }
  __magic_name__		       =				{
      '''B''': [['''C''', 1]],
      '''C''': [['''D''', 1]],
      '''D''': [['''F''', 1]],
      '''E''': [['''B''', 1], ['''G''', 2]],
      '''F''': [],
      '''G''': [['''F''', 1]],
  }
  
  __magic_name__		       =				dijkstra(G, '''E''', '''C''')
  print(short_distance)  # E -- 3 --> F -- 3 --> C == 6
  
  __magic_name__		       =				dijkstra(Ga, '''E''', '''F''')
  print(short_distance)  # E -- 3 --> F == 3
  
  __magic_name__		       =				dijkstra(Ga, '''E''', '''F''')
  print(short_distance)  # E -- 2 --> G -- 1 --> F == 3
  
  if __name__ == "__main__":
  			import doctest
  
  			doctest.testmod()
  
  
  
  
  