






import logging
import os
import sys
import threading
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


a 			=							threading.Lock()
a 			=							None

a 			=							{
    'debug': logging.DEBUG,
    'info': logging.INFO,
    'warning': logging.WARNING,
    'error': logging.ERROR,
    'critical': logging.CRITICAL,
}

a 			=							logging.WARNING

a 			=							True
def    a__    (	):
   lowercase__    :						Dict       =			os.getenv("""DIFFUSERS_VERBOSITY"""		,					A       )
   if env_level_str:
      if env_level_str in log_levels:
         return log_levels[env_level_str]
      else:
         logging.getLogger().warning(
             F'''Unknown option DIFFUSERS_VERBOSITY={env_level_str}, '''
             F'''has to be one of: { ", ".join(log_levels.keys()       ) }'''       )
   return _default_log_level
def    a__    (	):
   return __name__.split("""."""       )[0]
def    a__    (	):
   return logging.getLogger(_get_library_name()       )
def    a__    (	):
   global _default_handler

   with _lock:
      if _default_handler:
         # This library has already configured the library root logger.
         return
      lowercase__    :						List[str]       =			logging.StreamHandler()  # Set sys.stderr as stream.
      lowercase__    :						str       =			sys.stderr.flush

      # Apply our default configuration to the library root logger.
      lowercase__    :						Union[str, Any]       =			_get_library_root_logger()
      library_root_logger.addHandler(_default_handler       )
      library_root_logger.setLevel(_get_default_logging_level()       )
      lowercase__    :						Dict       =			False
def    a__    (	):
   global _default_handler

   with _lock:
      if not _default_handler:
         return

      lowercase__    :						List[str]       =			_get_library_root_logger()
      library_root_logger.removeHandler(_default_handler       )
      library_root_logger.setLevel(logging.NOTSET       )
      lowercase__    :						List[Any]       =			None
def    a__    (	):
   return log_levels
def    a__    (	A = None       ):

   if name is None:
      lowercase__    :						Union[str, Any]       =			_get_library_name()

   _configure_library_root_logger()
   return logging.getLogger(A       )
def    a__    (	):
   _configure_library_root_logger()
   return _get_library_root_logger().getEffectiveLevel()
def    a__    (	A       ):
   _configure_library_root_logger()
   _get_library_root_logger().setLevel(A       )
def    a__    (	):
   return set_verbosity(A       )
def    a__    (	):
   return set_verbosity(A       )
def    a__    (	):
   return set_verbosity(A       )
def    a__    (	):
   return set_verbosity(A       )
def    a__    (	):
   _configure_library_root_logger()

   assert _default_handler is not None
   _get_library_root_logger().removeHandler(_default_handler       )
def    a__    (	):
   _configure_library_root_logger()

   assert _default_handler is not None
   _get_library_root_logger().addHandler(_default_handler       )
def    a__    (	A       ):
   _configure_library_root_logger()

   assert handler is not None
   _get_library_root_logger().addHandler(A       )
def    a__    (	A       ):
   _configure_library_root_logger()

   assert handler is not None and handler not in _get_library_root_logger().handlers
   _get_library_root_logger().removeHandler(A       )
def    a__    (	):
   _configure_library_root_logger()
   lowercase__    :						Optional[Any]       =			False
def    a__    (	):
   _configure_library_root_logger()
   lowercase__    :						List[Any]       =			True
def    a__    (	):
   lowercase__    :						str       =			_get_library_root_logger().handlers

   for handler in handlers:
      lowercase__    :						Optional[int]       =			logging.Formatter("""[%(levelname)s|%(filename)s:%(lineno)s] %(asctime)s >> %(message)s"""       )
      handler.setFormatter(A       )
def    a__    (	):
   lowercase__    :						List[Any]       =			_get_library_root_logger().handlers

   for handler in handlers:
      handler.setFormatter(A       )
def    a__    (	self		,					*A		,					**A       ):
   lowercase__    :						List[str]       =			os.getenv("""DIFFUSERS_NO_ADVISORY_WARNINGS"""		,					A       )
   if no_advisory_warnings:
      return
   self.warning(*A		,					**A       )


a 			=							warning_advice
class 							__snake_case:



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

    """simple docstring"""






    lowercase__    :						List[str]       =			args[0] if args else None



 def __iter__(						self : Tuple						):

    """simple docstring"""






    return iter(self._iterator						)



 def __getattr__(						self : List[Any]			,		UpperCAmelCase__ : Union[str, Any]						):

    """simple docstring"""






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

    return empty_fn



 def __enter__(						self : Tuple						):

    """simple docstring"""






    return self







 def __exit__(						self : Dict			,		UpperCAmelCase__ : List[str]			,		UpperCAmelCase__ : str			,		UpperCAmelCase__ : List[str]						):

    """simple docstring"""






    return
class 							__snake_case:



 def __call__(						self : List[Any]			,		*UpperCAmelCase__ : str			,		**UpperCAmelCase__ : Dict						):

    """simple docstring"""






    if _tqdm_active:
       return tqdm_lib.tqdm(*UpperCAmelCase__			,		**UpperCAmelCase__						)
    else:
       return EmptyTqdm(*UpperCAmelCase__			,		**UpperCAmelCase__						)



 def     UpperCAmelCase     (						self : Any			,		*UpperCAmelCase__ : List[str]			,		**UpperCAmelCase__ : List[str]						):

    """simple docstring"""






    lowercase__    :						int       =			None
    if _tqdm_active:
       return tqdm_lib.tqdm.set_lock(*UpperCAmelCase__			,		**UpperCAmelCase__						)







 def     UpperCAmelCase     (						self : Any						):

    """simple docstring"""






    if _tqdm_active:
       return tqdm_lib.tqdm.get_lock()
a 			=							_tqdm_cls()
def    a__    (	):
   global _tqdm_active
   return bool(_tqdm_active       )
def    a__    (	):
   global _tqdm_active
   lowercase__    :						Tuple       =			True






def    a__    (	):
   global _tqdm_active
   lowercase__    :						Union[str, Any]       =			False










def    a__    (	A       ):
   return " ".join([word[::-1] for word in input_str.split()]       )


if __name__ == "__main__":
 import doctest

 doctest.testmod()


