




'''simple docstring'''





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

_SCREAMING_SNAKE_CASE							:     Union[str, Any]   	=				{0: [1, 2, 3], 1: [0, 3], 2: [0], 3: [0, 1], 4: [], 5: []}


def   UpperCamelCase_(			snake_case							: dict							,       snake_case							: int							,       snake_case							: list  ):

							'''simple docstring'''






							snake_case_			      =   True
							snake_case_			      =   []

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

							return [vert, *connected_verts]


def   UpperCamelCase_(			snake_case							: dict  ):

							'''simple docstring'''






							snake_case_			      =   len(snake_case  )
							snake_case_			      =   graph_size * [False]
							snake_case_			      =   []

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

							return components_list


if __name__ == "__main__":
		import doctest

		doctest.testmod()










'''simple docstring'''





from typing import TYPE_CHECKING

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


_SCREAMING_SNAKE_CASE							:     Dict   	=				{
    "configuration_mobilevitv2": [
        "MOBILEVITV2_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "MobileViTV2Config",
        "MobileViTV2OnnxConfig",
    ],
}


try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_SCREAMING_SNAKE_CASE							:     Optional[Any]   	=				[
		    "MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "MobileViTV2ForImageClassification",
		    "MobileViTV2ForSemanticSegmentation",
		    "MobileViTV2Model",
		    "MobileViTV2PreTrainedModel",
		]

if TYPE_CHECKING:
		from .configuration_mobilevitva import (
		    MOBILEVITV2_PRETRAINED_CONFIG_ARCHIVE_MAP,
		    MobileViTVaConfig,
		    MobileViTVaOnnxConfig,
		)

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_mobilevitva import (
				    MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST,
				    MobileViTVaForImageClassification,
				    MobileViTVaForSemanticSegmentation,
				    MobileViTVaModel,
				    MobileViTVaPreTrainedModel,
				)

else:
		import sys

		_SCREAMING_SNAKE_CASE							:     Any   	=				_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




