


"""simple docstring"""







from .imports import is_tqdm_available


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

from ..state import PartialState
def  a__      (    SCREAMING_SNAKE_CASE   :   bool = True    ,				*SCREAMING_SNAKE_CASE   :   Dict    ,				**SCREAMING_SNAKE_CASE   :   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`."    )
  lowerCAmelCase					:					List[Any]								=							False
  if main_process_only:
    lowerCAmelCase					:					Union[str, Any]								=							PartialState().local_process_index == 0
  return _tqdm(*UpperCamelCase__    ,				**UpperCamelCase__    ,				disable=UpperCamelCase__    )









"""simple docstring"""







from typing import TYPE_CHECKING

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


lowerCAmelCase__				    =       {'''configuration_van''': ['''VAN_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''VanConfig''']}


try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     lowerCAmelCase__				    =       [
         '''VAN_PRETRAINED_MODEL_ARCHIVE_LIST''',
         '''VanForImageClassification''',
         '''VanModel''',
         '''VanPreTrainedModel''',
     ]

if TYPE_CHECKING:
     from .configuration_van import VAN_PRETRAINED_CONFIG_ARCHIVE_MAP, VanConfig

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_van import (
              VAN_PRETRAINED_MODEL_ARCHIVE_LIST,
              VanForImageClassification,
              VanModel,
              VanPreTrainedModel,
          )

else:
     import sys

     lowerCAmelCase__				    =       _LazyModule(__name__, globals()['''__file__'''], _import_structure)





