





"""simple docstring"""






from collections import deque

def      __A   (      a_    :Dict)		->		int:
				__a			:    int      							=	len(a_)
				__a			:    Any      							=	deque()
				__a			:    Union[str, Any]      							=	[False for _ in range(a_)]
				__a			:    Any      							=	[-1 for _ in range(a_)]
				__a			:    Optional[Any]      							=	index_of[:]

				def strong_connect(a_    :str ,							a_    :int ,							a_    :Union[str, Any]):
								__a			:    List[str]      							=	index  # the number when this node is seen
								__a			:    int      							=	index  # lowest rank node reachable from here
								index += 1
								stack.append(a_)
								__a			:    str      							=	True

								for w in g[v]:
												if index_of[w] == -1:
																__a			:    Any      							=	strong_connect(a_ ,							a_ ,							a_)
																__a			:    Optional[int]      							=	(
																    lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
																)
												elif on_stack[w]:
																__a			:    Tuple      							=	(
																    lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
																)

								if lowlink_of[v] == index_of[v]:
												__a			:    Dict      							=	[]
												__a			:    Dict      							=	stack.pop()
												__a			:    int      							=	False
												component.append(a_)
												while w != v:
																__a			:    int      							=	stack.pop()
																__a			:    List[str]      							=	False
																component.append(a_)
												components.append(a_)
								return index

				__a			:    List[str]      							=	[]
				for v in range(a_):
								if index_of[v] == -1:
												strong_connect(a_ ,							0 ,							a_)

				return components

def      __A   (      a_    :int ,							a_    :str)		->		Dict:
				__a			:    Dict      							=	[[] for _ in range(a_)]
				for u, v in edges:
								g[u].append(a_)
				return g


if __name__ == "__main__":
		# Test
		A			      =	7
		A			      =	[0, 0, 1, 2, 3, 3, 4, 4, 6]
		A			      =	[1, 3, 2, 0, 1, 4, 5, 6, 5]
		A			      =	[(u, v) for u, v in zip(source, target)]
		A			      =	create_graph(n_vertices, edges)

		assert [[5], [6], [4], [3, 2, 1, 0]] == tarjan(g)







"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


snake_case : int     		=		{}

try:
 if not is_sentencepiece_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 snake_case : str     		=		["""NllbTokenizer"""]

try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 snake_case : Dict     		=		["""NllbTokenizerFast"""]


if TYPE_CHECKING:
 try:
  if not is_sentencepiece_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_nllb import NllbTokenizer

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_nllb_fast import NllbTokenizerFast

else:
 import sys

 snake_case : Dict     		=		_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)