






'''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_				   =   {
    '''debug''': logging.DEBUG,
    '''info''': logging.INFO,
    '''warning''': logging.WARNING,
    '''error''': logging.ERROR,
    '''critical''': logging.CRITICAL,
}

lowerCamelCase_				   =   logging.WARNING

def    __lowercase		(     )			->		Optional[Any]:

      '''simple docstring'''


      _A     	=      os.getenv("DATASETS_VERBOSITY"  ,    __UpperCAmelCase			)
      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    __lowercase		(     )			->		str:

      '''simple docstring'''


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

def    __lowercase		(     )			->		logging.Logger:

      '''simple docstring'''


      return logging.getLogger(_get_library_name()			)

def    __lowercase		(     )			->		None:

      '''simple docstring'''


      _A     	=      _get_library_root_logger()
      library_root_logger.setLevel(_get_default_logging_level()			)

def    __lowercase		(     )			->		None:

      '''simple docstring'''


      _A     	=      _get_library_root_logger()
      library_root_logger.setLevel(logging.NOTSET			)

def    __lowercase		(     __lowercase = None			)			->		logging.Logger:

      '''simple docstring'''


      if name is None:
            _A     	=      _get_library_name()
      return logging.getLogger(__UpperCAmelCase			)

def    __lowercase		(     )			->		int:

      '''simple docstring'''


      return _get_library_root_logger().getEffectiveLevel()

def    __lowercase		(     __lowercase			)			->		None:

      '''simple docstring'''


      _get_library_root_logger().setLevel(__UpperCAmelCase			)

def    __lowercase		(     )			->		str:

      '''simple docstring'''


      return set_verbosity(__UpperCAmelCase			)

def    __lowercase		(     )			->		Optional[int]:

      '''simple docstring'''


      return set_verbosity(__UpperCAmelCase			)

def    __lowercase		(     )			->		Union[str, Any]:

      '''simple docstring'''


      return set_verbosity(__UpperCAmelCase			)

def    __lowercase		(     )			->		Tuple:

      '''simple docstring'''


      return set_verbosity(__UpperCAmelCase			)

def    __lowercase		(     )			->		None:

      '''simple docstring'''


      _A     	=      False

def    __lowercase		(     )			->		None:

      '''simple docstring'''


      _A     	=      True


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

class   _UpperCAmelCase     :




   """simple docstring"""

   def __init__(						self					:      Union[str, Any] , *__UpperCAmelCase					:      List[Any] , **__UpperCAmelCase					:      Optional[int]						):  # pylint: disable=unused-argument





         '''simple docstring'''





         _A     	=      args[0] if args else None

   def __iter__(						self					:      List[Any]						):





         '''simple docstring'''





         return iter(self._iterator						)

   def __getattr__(						self					:      int , __UpperCAmelCase					:      List[str]						):





         '''simple docstring'''





         def empty_fn(*__UpperCAmelCase					:      Any , **__UpperCAmelCase					:      Optional[int]						):  # pylint: disable=unused-argument
               return

         return empty_fn

   def __enter__(						self					:      List[Any]						):





         '''simple docstring'''





         return self

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





         '''simple docstring'''





         return





lowerCamelCase_				   =   True

class   _UpperCAmelCase     :




   """simple docstring"""

   def __call__(						self					:      Optional[int] , *__UpperCAmelCase					:      Dict , __UpperCAmelCase					:      List[str]=False , **__UpperCAmelCase					:      Optional[Any]						):





         '''simple docstring'''





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

   def 		lowerCAmelCase					(						self					:      Union[str, Any] , *__UpperCAmelCase					:      Tuple , **__UpperCAmelCase					:      int						):





         '''simple docstring'''





         _A     	=      None
         if _tqdm_active:
               return tqdm_lib.tqdm.set_lock(*a_ , **a_						)

   def 		lowerCAmelCase					(						self					:      Tuple						):





         '''simple docstring'''





         if _tqdm_active:
               return tqdm_lib.tqdm.get_lock()





lowerCamelCase_				   =   _tqdm_cls()

def    __lowercase		(     )			->		bool:

      '''simple docstring'''


      global _tqdm_active
      return bool(_tqdm_active			)

def    __lowercase		(     )			->		Optional[Any]:

      '''simple docstring'''


      global _tqdm_active
      _A     	=      True


def    __lowercase		(     )			->		Optional[int]:

      '''simple docstring'''


      global _tqdm_active
      _A     	=      False










'''simple docstring'''

from diffusers.utils.testing_utils import require_onnxruntime






@require_onnxruntime
class 						a_		:
							pass




