

def   __UpperCAmelCase					(      __a :     Optional[Any]      )     ->	Any:

					"""simple docstring"""

					_a      :       List[str]   =						[0] * len(__a      )
					_a      :       Union[str, Any]   =						[]
					_a      :       Dict   =						[1] * len(__a      )

					for values in graph.values():
										for i in values:
															indegree[i] += 1

					for i in range(len(__a      )      ):
										if indegree[i] == 0:
															queue.append(__a      )

					while queue:
										_a      :       Optional[int]   =						queue.pop(0      )
										for x in graph[vertex]:
															indegree[x] -= 1

															if long_dist[vertex] + 1 > long_dist[x]:
																				_a      :       int   =						long_dist[vertex] + 1

															if indegree[x] == 0:
																				queue.append(__a      )

					print(max(__a      )      )


# Adjacency list of Graph
a__												=						{0: [2, 3, 4], 1: [2, 7], 2: [5], 3: [5, 7], 4: [7], 5: [6], 6: [7], 7: []}







longest_distance(graph)









from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__magic_name__  :  Optional[Any]					=       {
    """configuration_informer""": [
        """INFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """InformerConfig""",
    ],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      __magic_name__  :  int					=       [
          """INFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """InformerForPrediction""",
          """InformerModel""",
          """InformerPreTrainedModel""",
      ]


if TYPE_CHECKING:
      from .configuration_informer import INFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, InformerConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_informer import (
                INFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
                InformerForPrediction,
                InformerModel,
                InformerPreTrainedModel,
            )

else:
      import sys

      __magic_name__  :  Any					=       _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

