

from .imports import is_tqdm_available


if is_tqdm_available():
      from tqdm.auto import tqdm as _tqdm

from ..state import PartialState


def 							__lowerCAmelCase     (							_UpperCamelCase		:	bool = True		,				*_UpperCamelCase		:	Optional[int]		,				**_UpperCamelCase		:	Union[str, Any]						)		->				List[Any]:
 '''simple docstring'''


 if not is_tqdm_available():
  raise ImportError('Accelerate\'s `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`.'						)
 SCREAMING_SNAKE_CASE		    =      False
 if main_process_only:
  SCREAMING_SNAKE_CASE		    =      PartialState().local_process_index == 0
 return _tqdm(*_UpperCamelCase		,				**_UpperCamelCase		,				disable=_UpperCamelCase						)




from graphs.minimum_spanning_tree_kruskal import kruskal


def 							__lowerCAmelCase     (							)		->				Optional[Any]:
 '''simple docstring'''


 SCREAMING_SNAKE_CASE		    =      9
 SCREAMING_SNAKE_CASE		    =      [
     [0, 1, 4],
     [0, 7, 8],
     [1, 2, 8],
     [7, 8, 7],
     [7, 6, 1],
     [2, 8, 2],
     [8, 6, 6],
     [2, 3, 7],
     [2, 5, 4],
     [6, 5, 2],
     [3, 5, 14],
     [3, 4, 9],
     [5, 4, 10],
     [1, 7, 11],
 ]

 SCREAMING_SNAKE_CASE		    =      kruskal(_UpperCamelCase		,				_UpperCamelCase						)

 SCREAMING_SNAKE_CASE		    =      [
     [7, 6, 1],
     [2, 8, 2],
     [6, 5, 2],
     [0, 1, 4],
     [2, 5, 4],
     [2, 3, 7],
     [0, 7, 8],
     [3, 4, 9],
 ]

 assert sorted(_UpperCamelCase						) == sorted(_UpperCamelCase						)

