





"""simple docstring"""




def 	a_    (							_lowercase       ):
						_UpperCamelCase      : Dict         =   [0] * len(_lowercase       )
						_UpperCamelCase      : Optional[int]         =   []
						_UpperCamelCase      : str         =   [1] * len(_lowercase       )

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

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

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

																		if long_dist[vertex] + 1 > long_dist[x]:
																								_UpperCamelCase      : Optional[Any]         =   long_dist[vertex] + 1

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

						print(max(_lowercase       )       )


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






longest_distance(graph)










"""simple docstring"""




import warnings

from diffusers import StableDiffusionInpaintPipeline as StableDiffusionInpaintPipeline  # noqa F401


warnings.warn(
    """The `inpainting.py` script is outdated. Please use directly `from diffusers import"""
    """ StableDiffusionInpaintPipeline` instead."""
)



