


"""simple docstring"""






import logging
import os
from logging import (
    CRITICAL,  # NOQA
    DEBUG,  # NOQA
    ERROR,  # NOQA
    FATAL,  # NOQA
    INFO,  # NOQA
    NOTSET,  # NOQA
    WARN,  # NOQA
    WARNING,  # NOQA
)
from typing import Optional

from tqdm import auto as tqdm_lib


_lowerCAmelCase							:    Any					   =	{
    """debug""": logging.DEBUG,
    """info""": logging.INFO,
    """warning""": logging.WARNING,
    """error""": logging.ERROR,
    """critical""": logging.CRITICAL,
}

_lowerCAmelCase							:    int					   =	logging.WARNING







def        lowerCamelCase_(		)    ->     Union[str, Any]:
   '''simple docstring'''





   _lowerCamelCase   :				str							=     os.getenv("DATASETS_VERBOSITY"			,		_lowerCAmelCase       )
   if env_level_str:
      if env_level_str in log_levels:
         return log_levels[env_level_str]
      else:
         logging.getLogger().warning(
             F"""Unknown option DATASETS_VERBOSITY={env_level_str}, """
             F"""has to be one of: { ', '.join(log_levels.keys()       ) }"""       )
   return _default_log_level







def        lowerCamelCase_(		)    ->     str:
   '''simple docstring'''





   return __name__.split("."       )[0]







def        lowerCamelCase_(		)    ->     logging.Logger:
   '''simple docstring'''





   return logging.getLogger(_get_library_name()       )







def        lowerCamelCase_(		)    ->     None:
   '''simple docstring'''





   _lowerCamelCase   :				str							=     _get_library_root_logger()
   library_root_logger.setLevel(_get_default_logging_level()       )







def        lowerCamelCase_(		)    ->     None:
   '''simple docstring'''





   _lowerCamelCase   :				Dict							=     _get_library_root_logger()
   library_root_logger.setLevel(logging.NOTSET       )







def        lowerCamelCase_(		_lowerCamelCase = None       )    ->     logging.Logger:
   '''simple docstring'''





   if name is None:
      _lowerCamelCase   :				List[Any]							=     _get_library_name()
   return logging.getLogger(_lowerCAmelCase       )







def        lowerCamelCase_(		)    ->     int:
   '''simple docstring'''





   return _get_library_root_logger().getEffectiveLevel()







def        lowerCamelCase_(		_lowerCamelCase       )    ->     None:
   '''simple docstring'''





   _get_library_root_logger().setLevel(_lowerCAmelCase       )







def        lowerCamelCase_(		)    ->     List[str]:
   '''simple docstring'''





   return set_verbosity(_lowerCAmelCase       )







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





   return set_verbosity(_lowerCAmelCase       )







def        lowerCamelCase_(		)    ->     Union[str, Any]:
   '''simple docstring'''





   return set_verbosity(_lowerCAmelCase       )







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





   return set_verbosity(_lowerCAmelCase       )







def        lowerCamelCase_(		)    ->     None:
   '''simple docstring'''





   _lowerCamelCase   :				Optional[int]							=     False







def        lowerCamelCase_(		)    ->     None:
   '''simple docstring'''





   _lowerCamelCase   :				Tuple							=     True


# Configure the library root logger at the module level (singleton-like)
_configure_library_root_logger()




class 							A_      :


  def __init__(			self:						Dict							,*__lowerCAmelCase:						List[Any]							,**__lowerCAmelCase:						List[str]    ):  # pylint: disable=unused-argument







     '''simple docstring'''







     _lowerCamelCase   :				Union[str, Any]							=     args[0] if args else None


  def __iter__(			self:						int    ):







     '''simple docstring'''







     return iter(self._iterator    )


  def __getattr__(			self:						Optional[int]							,__lowerCAmelCase:						Optional[Any]    ):







     '''simple docstring'''







     def empty_fn(*__lowerCAmelCase:						Any							,**__lowerCAmelCase:						Any    ):  # pylint: disable=unused-argument
        return

     return empty_fn


  def __enter__(			self:						List[Any]    ):







     '''simple docstring'''







     return self






  def __exit__(			self:						List[str]							,__lowerCAmelCase:						str							,__lowerCAmelCase:						Optional[Any]							,__lowerCAmelCase:						int    ):







     '''simple docstring'''







     return


_lowerCAmelCase							:    Optional[Any]					   =	True




class 							A_      :


  def __call__(			self:						Union[str, Any]							,*__lowerCAmelCase:						Union[str, Any]							,__lowerCAmelCase:						int=False							,**__lowerCAmelCase:						List[str]    ):







     '''simple docstring'''







     if _tqdm_active and not disable:
        return tqdm_lib.tqdm(*A_							,**A_    )
     else:
        return EmptyTqdm(*A_							,**A_    )


  def 							_lowercase					(			self:						Optional[Any]							,*__lowerCAmelCase:						Union[str, Any]							,**__lowerCAmelCase:						List[str]    ):







     '''simple docstring'''







     _lowerCamelCase   :				str							=     None
     if _tqdm_active:
        return tqdm_lib.tqdm.set_lock(*A_							,**A_    )






  def 							_lowercase					(			self:						List[str]    ):







     '''simple docstring'''







     if _tqdm_active:
        return tqdm_lib.tqdm.get_lock()


_lowerCAmelCase							:    List[Any]					   =	_tqdm_cls()







def        lowerCamelCase_(		)    ->     bool:
   '''simple docstring'''





   global _tqdm_active
   return bool(_tqdm_active       )







def        lowerCamelCase_(		)    ->     Dict:
   '''simple docstring'''





   global _tqdm_active
   _lowerCamelCase   :				Optional[Any]							=     True







def        lowerCamelCase_(		)    ->     Any:
   '''simple docstring'''





   global _tqdm_active
   _lowerCamelCase   :				Optional[Any]							=     False






import warnings

from ...utils import logging
from .image_processing_beit import BeitImageProcessor


__lowerCamelCase			:	Optional[Any]					    =	logging.get_logger(__name__)



class    A__  (			__snake_case     ):





      def __init__(					self			,				*A_			,				**A_  ):
       '''simple docstring'''




       warnings.warn(
           "The class BeitFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"
           " use BeitImageProcessor instead."			,				A_			,				)
       super().__init__(*A_			,				**A_  )
