





'''simple docstring'''

from ..utils import DummyObject, requires_backends






class        UpperCAmelCase     (	metaclass=UpperCamelCase__    ):
 __lowercase       		=    ["""flax""", """transformers"""]
 def __init__(    self				:Tuple						,	*lowercase_				:Dict						,	**lowercase_				:Optional[int]							)->							List[str]:
     requires_backends(self						,	["flax", "transformers"]							)
 @classmethod
 def 					UpperCAmelCase_							(    cls				:Tuple						,	*lowercase_				:Optional[int]						,	**lowercase_				:Optional[Any]							)->							List[Any]:
     requires_backends(cls						,	["flax", "transformers"]							)



 @classmethod
 def 					UpperCAmelCase_							(    cls				:int						,	*lowercase_				:List[Any]						,	**lowercase_				:List[Any]							)->							int:
     requires_backends(cls						,	["flax", "transformers"]							)






class        UpperCAmelCase     (	metaclass=UpperCamelCase__    ):
 __lowercase       		=    ["""flax""", """transformers"""]
 def __init__(    self				:Optional[int]						,	*lowercase_				:List[Any]						,	**lowercase_				:int							)->							int:
     requires_backends(self						,	["flax", "transformers"]							)
 @classmethod
 def 					UpperCAmelCase_							(    cls				:Dict						,	*lowercase_				:Union[str, Any]						,	**lowercase_				:Any							)->							int:
     requires_backends(cls						,	["flax", "transformers"]							)



 @classmethod
 def 					UpperCAmelCase_							(    cls				:List[Any]						,	*lowercase_				:Tuple						,	**lowercase_				:Tuple							)->							Tuple:
     requires_backends(cls						,	["flax", "transformers"]							)






class        UpperCAmelCase     (	metaclass=UpperCamelCase__    ):
 __lowercase       		=    ["""flax""", """transformers"""]
 def __init__(    self				:int						,	*lowercase_				:Dict						,	**lowercase_				:str							)->							Any:
     requires_backends(self						,	["flax", "transformers"]							)
 @classmethod
 def 					UpperCAmelCase_							(    cls				:Union[str, Any]						,	*lowercase_				:List[str]						,	**lowercase_				:List[Any]							)->							str:
     requires_backends(cls						,	["flax", "transformers"]							)



 @classmethod
 def 					UpperCAmelCase_							(    cls				:Dict						,	*lowercase_				:Any						,	**lowercase_				:Union[str, Any]							)->							Union[str, Any]:
     requires_backends(cls						,	["flax", "transformers"]							)






class        UpperCAmelCase     (	metaclass=UpperCamelCase__    ):
 __lowercase       		=    ["""flax""", """transformers"""]
 def __init__(    self				:Dict						,	*lowercase_				:Tuple						,	**lowercase_				:List[Any]							)->							Dict:
     requires_backends(self						,	["flax", "transformers"]							)
 @classmethod
 def 					UpperCAmelCase_							(    cls				:Any						,	*lowercase_				:Tuple						,	**lowercase_				:Dict							)->							Dict:
     requires_backends(cls						,	["flax", "transformers"]							)



 @classmethod
 def 					UpperCAmelCase_							(    cls				:int						,	*lowercase_				:Tuple						,	**lowercase_				:List[str]							)->							List[str]:
     requires_backends(cls						,	["flax", "transformers"]							)










'''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	)



