


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

lowerCAmelCase__   	=				{0: [1, 2, 3], 1: [0, 3], 2: [0], 3: [0, 1], 4: [], 5: []}
def 							_UpperCAmelCase       (UpperCamelCase__  :						dict       ,							UpperCamelCase__  :						int       ,							UpperCamelCase__  :						list		):
       _A   : str       					=				True
       _A   : List[Any]       					=				[]

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

       return [vert, *connected_verts]
def 							_UpperCAmelCase       (UpperCamelCase__  :						dict		):
       _A   : int       					=				len(UpperCamelCase__		)
       _A   : Optional[int]       					=				graph_size * [False]
       _A   : str       					=				[]

       for i in range(UpperCamelCase__		):
              if not visited[i]:
                     _A   : List[str]       					=				dfs(UpperCamelCase__       ,							UpperCamelCase__       ,							UpperCamelCase__		)
                     components_list.append(UpperCamelCase__		)

       return components_list


if __name__ == "__main__":
    import doctest

    doctest.testmod()




from typing import TYPE_CHECKING

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


lowerCAmelCase__   	=				{
    'configuration_deta': ['DETA_PRETRAINED_CONFIG_ARCHIVE_MAP', 'DetaConfig'],
}

try:
    if not is_vision_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    lowerCAmelCase__   	=				['DetaImageProcessor']

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    lowerCAmelCase__   	=				[
        'DETA_PRETRAINED_MODEL_ARCHIVE_LIST',
        'DetaForObjectDetection',
        'DetaModel',
        'DetaPreTrainedModel',
    ]


if TYPE_CHECKING:
    from .configuration_deta import DETA_PRETRAINED_CONFIG_ARCHIVE_MAP, DetaConfig

    try:
        if not is_vision_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .image_processing_deta import DetaImageProcessor

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_deta import (
            DETA_PRETRAINED_MODEL_ARCHIVE_LIST,
            DetaForObjectDetection,
            DetaModel,
            DetaPreTrainedModel,
        )

else:
    import sys

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