from ..utils import DummyObject, requires_backends







class __snake_case    (						metaclass=lowerCamelCase_		):
   lowerCAmelCase_														=							["transformers", "torch", "note_seq"]




   def __init__(   self      :    List[str]	,     *_lowercase      :    Optional[Any]	,     **_lowercase      :    Optional[Any]				):



     """simple docstring"""






     requires_backends(self	,     ["""transformers""", """torch""", """note_seq"""]				)




   @classmethod
   def      __a						(   cls      :    List[Any]	,     *_lowercase      :    Optional[int]	,     **_lowercase      :    Optional[Any]				):



     """simple docstring"""






     requires_backends(cls	,     ["""transformers""", """torch""", """note_seq"""]				)




   @classmethod
   def      __a						(   cls      :    Any	,     *_lowercase      :    int	,     **_lowercase      :    Dict				):



     """simple docstring"""






     requires_backends(cls	,     ["""transformers""", """torch""", """note_seq"""]				)

def      __SCREAMING_SNAKE_CASE  ( __UpperCamelCase   :	List[Any]     )							-> Any:







  """simple docstring"""





  SCREAMING_SNAKE_CASE__      							=				[0] * len(__UpperCamelCase     )
  SCREAMING_SNAKE_CASE__      							=				[]
  SCREAMING_SNAKE_CASE__      							=				[1] * len(__UpperCamelCase     )

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

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

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

      if long_dist[vertex] + 1 > long_dist[x]:
        SCREAMING_SNAKE_CASE__      							=				long_dist[vertex] + 1

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

  print(max(__UpperCamelCase     )     )


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






longest_distance(graph)
