


from .imports import is_tqdm_available


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

from ..state import PartialState







def     _lowercase							(  __lowerCamelCase      :       Union[str, Any] = True		,*__lowerCamelCase      :       List[str]		,**__lowerCamelCase      :       Optional[int]      )	-> Optional[Any]:





     '''simple docstring'''





     if not is_tqdm_available():
          raise ImportError('''Accelerate\'s `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`.'''      )
     UpperCamelCase__				:	List[str]										=  False
     if main_process_only:
          UpperCamelCase__				:	Optional[Any]										=  PartialState().local_process_index == 0
     return _tqdm(*_lowerCAmelCase		,**_lowerCAmelCase		,disable=_lowerCAmelCase      )











from typing import Any



def 						A_							(	_lowerCAmelCase	)		->					list[Any]:
 if not input_list:
  return []
 UpperCamelCase      :   List[str]			      =  [input_list.count(_lowerCAmelCase	) for value in input_list]
 UpperCamelCase      :   Dict			      =  max(_lowerCAmelCase	)  # Gets the maximum count in the input list.
 # Gets values of modes
 return sorted({input_list[i] for i, value in enumerate(_lowerCAmelCase	) if value == y}	)


if __name__ == "__main__":
    import doctest

    doctest.testmod()
