





'''simple docstring'''

from abc import ABC, abstractmethod
from argparse import ArgumentParser






class        UpperCAmelCase     (	UpperCamelCase__    ):
 @staticmethod
 @abstractmethod
 def 					UpperCAmelCase_							(    lowercase_				:ArgumentParser							)->							Dict:
     raise NotImplementedError()



 @abstractmethod
 def 					UpperCAmelCase_							(    self				:Optional[Any]							)->							List[Any]:
     raise NotImplementedError()










'''simple docstring'''

from .imports import is_tqdm_available


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

from ..state import PartialState





def 						UpperCamelCase    (							_lowerCamelCase : bool = True						,	*_lowerCamelCase : Optional[int]						,	**_lowerCamelCase : Optional[Any]	):
    if not is_tqdm_available():
        raise ImportError("Accelerate's `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`."	)
    A__    =      False
    if main_process_only:
        A__    =      PartialState().local_process_index == 0
    return _tqdm(*_lowerCamelCase						,	**_lowerCamelCase						,	disable=_lowerCamelCase	)



