'''simple docstring'''




from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


snake_case  =			{
    '''configuration_retribert''': ['''RETRIBERT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''RetriBertConfig'''],
    '''tokenization_retribert''': ['''RetriBertTokenizer'''],
}

try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 snake_case  =			['''RetriBertTokenizerFast''']

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 snake_case  =			[
     '''RETRIBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''RetriBertModel''',
     '''RetriBertPreTrainedModel''',
 ]


if TYPE_CHECKING:
 from .configuration_retribert import RETRIBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, RetriBertConfig
 from .tokenization_retribert import RetriBertTokenizer

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_retribert_fast import RetriBertTokenizerFast

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_retribert import (
      RETRIBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
      RetriBertModel,
      RetriBertPreTrainedModel,
  )

else:
 import sys

 snake_case  =			_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)






'''simple docstring'''




snake_case  =			{0: [1, 2], 1: [0, 3], 2: [0], 3: [1], 4: [5, 6], 5: [4, 6], 6: [4, 5]}

snake_case  =			{0: [1, 2, 3], 1: [0, 3], 2: [0], 3: [0, 1], 4: [], 5: []}







def 			A_   ( _lowerCamelCase			:							dict  ,  _lowerCamelCase			:							int  ,  _lowerCamelCase			:							list    ):
      _lowerCAmelCase		   =   True
      _lowerCAmelCase		   =   []

      for neighbour in graph[vert]:
            if not visited[neighbour]:
                  connected_verts += dfs(_lowerCamelCase  ,  _lowerCamelCase  ,  _lowerCamelCase    )

      return [vert, *connected_verts]







def 			A_   ( _lowerCamelCase			:							dict    ):
      _lowerCAmelCase		   =   len(_lowerCamelCase    )
      _lowerCAmelCase		   =   graph_size * [False]
      _lowerCAmelCase		   =   []

      for i in range(_lowerCamelCase    ):
            if not visited[i]:
                  _lowerCAmelCase		   =   dfs(_lowerCamelCase  ,  _lowerCamelCase  ,  _lowerCamelCase    )
                  components_list.append(_lowerCamelCase    )

      return components_list


if __name__ == "__main__":
 import doctest

 doctest.testmod()





