'''simple docstring'''




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


__SCREAMING_SNAKE_CASE	:					Tuple					=  threading.Lock()
__SCREAMING_SNAKE_CASE	:					Optional[logging.Handler]					=  None

__SCREAMING_SNAKE_CASE	:					Union[str, Any]					=  {
    """debug""": logging.DEBUG,
    """info""": logging.INFO,
    """warning""": logging.WARNING,
    """error""": logging.ERROR,
    """critical""": logging.CRITICAL,
}

__SCREAMING_SNAKE_CASE	:					List[str]					=  logging.WARNING

__SCREAMING_SNAKE_CASE	:					Tuple					=  True

def      UpperCamelCase_							( )   ->   List[Any]:


       """simple docstring"""







       _UpperCAmelCase					:  Union[str, Any]											=   os.getenv("DIFFUSERS_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 DIFFUSERS_VERBOSITY={env_level_str}, """
                         F"""has to be one of: { ', '.join(log_levels.keys()   ) }"""   )
       return _default_log_level

def      UpperCamelCase_							( )   ->   str:


       """simple docstring"""







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

def      UpperCamelCase_							( )   ->   logging.Logger:


       """simple docstring"""







       return logging.getLogger(_get_library_name()   )

def      UpperCamelCase_							( )   ->   None:


       """simple docstring"""







       global _default_handler

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

              # Apply our default configuration to the library root logger.
              _UpperCAmelCase					:  List[Any]											=   _get_library_root_logger()
              library_root_logger.addHandler(_default_handler   )
              library_root_logger.setLevel(_get_default_logging_level()   )
              _UpperCAmelCase					:  Optional[int]											=   False

def      UpperCamelCase_							( )   ->   None:


       """simple docstring"""







       global _default_handler

       with _lock:
              if not _default_handler:
                     return

              _UpperCAmelCase					:  Dict											=   _get_library_root_logger()
              library_root_logger.removeHandler(_default_handler   )
              library_root_logger.setLevel(logging.NOTSET   )
              _UpperCAmelCase					:  List[Any]											=   None

def      UpperCamelCase_							( )   ->   str:


       """simple docstring"""







       return log_levels

def      UpperCamelCase_							( _UpperCAmelCase  :				Optional[str] = None   )   ->   logging.Logger:


       """simple docstring"""







       if name is None:
              _UpperCAmelCase					:  int											=   _get_library_name()

       _configure_library_root_logger()
       return logging.getLogger(_UpperCAmelCase   )

def      UpperCamelCase_							( )   ->   int:


       """simple docstring"""







       _configure_library_root_logger()
       return _get_library_root_logger().getEffectiveLevel()

def      UpperCamelCase_							( _UpperCAmelCase  :				int   )   ->   None:


       """simple docstring"""







       _configure_library_root_logger()
       _get_library_root_logger().setLevel(_UpperCAmelCase   )

def      UpperCamelCase_							( )   ->   Optional[int]:


       """simple docstring"""







       return set_verbosity(_UpperCAmelCase   )

def      UpperCamelCase_							( )   ->   str:


       """simple docstring"""







       return set_verbosity(_UpperCAmelCase   )

def      UpperCamelCase_							( )   ->   int:


       """simple docstring"""







       return set_verbosity(_UpperCAmelCase   )

def      UpperCamelCase_							( )   ->   Dict:


       """simple docstring"""







       return set_verbosity(_UpperCAmelCase   )

def      UpperCamelCase_							( )   ->   None:


       """simple docstring"""







       _configure_library_root_logger()

       assert _default_handler is not None
       _get_library_root_logger().removeHandler(_default_handler   )

def      UpperCamelCase_							( )   ->   None:


       """simple docstring"""







       _configure_library_root_logger()

       assert _default_handler is not None
       _get_library_root_logger().addHandler(_default_handler   )

def      UpperCamelCase_							( _UpperCAmelCase  :				logging.Handler   )   ->   None:


       """simple docstring"""







       _configure_library_root_logger()

       assert handler is not None
       _get_library_root_logger().addHandler(_UpperCAmelCase   )

def      UpperCamelCase_							( _UpperCAmelCase  :				logging.Handler   )   ->   None:


       """simple docstring"""







       _configure_library_root_logger()

       assert handler is not None and handler not in _get_library_root_logger().handlers
       _get_library_root_logger().removeHandler(_UpperCAmelCase   )

def      UpperCamelCase_							( )   ->   None:


       """simple docstring"""







       _configure_library_root_logger()
       _UpperCAmelCase					:  List[Any]											=   False

def      UpperCamelCase_							( )   ->   None:


       """simple docstring"""







       _configure_library_root_logger()
       _UpperCAmelCase					:  List[str]											=   True

def      UpperCamelCase_							( )   ->   None:


       """simple docstring"""







       _UpperCAmelCase					:  int											=   _get_library_root_logger().handlers

       for handler in handlers:
              _UpperCAmelCase					:  Tuple											=   logging.Formatter("[%(levelname)s|%(filename)s:%(lineno)s] %(asctime)s >> %(message)s"   )
              handler.setFormatter(_UpperCAmelCase   )

def      UpperCamelCase_							( )   ->   None:


       """simple docstring"""







       _UpperCAmelCase					:  Optional[Any]											=   _get_library_root_logger().handlers

       for handler in handlers:
              handler.setFormatter(_UpperCAmelCase   )

def      UpperCamelCase_							( self  :				int      ,     *_UpperCAmelCase  :				Any      ,     **_UpperCAmelCase  :				Tuple   )   ->   Any:


       """simple docstring"""







       _UpperCAmelCase					:  Optional[Any]											=   os.getenv("DIFFUSERS_NO_ADVISORY_WARNINGS"      ,     _UpperCAmelCase   )
       if no_advisory_warnings:
              return
       self.warning(*_UpperCAmelCase      ,     **_UpperCAmelCase   )


__SCREAMING_SNAKE_CASE	:					Tuple					=  warning_advice

class      lowerCamelCase_     :
      '''simple docstring'''

      def __init__(	self						:    Any						, *A						:    Dict						, **A						:    List[str]	):  # pylint: disable=unused-argument
             _UpperCAmelCase					:  List[Any]											=   args[0] if args else None




      def __iter__(	self						:    List[str]	):
             return iter(self._iterator	)




      def __getattr__(	self						:    List[Any]						, A						:    Tuple	):

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

             return empty_fn




      def __enter__(	self						:    Any	):
             return self





      def __exit__(	self						:    Union[str, Any]						, A						:    int						, A						:    Dict						, A						:    List[Any]	):
             return

class      lowerCamelCase_     :
      '''simple docstring'''

      def __call__(	self						:    Optional[int]						, *A						:    str						, **A						:    Optional[int]	):
             if _tqdm_active:
                    return tqdm_lib.tqdm(*A						, **A	)
             else:
                    return EmptyTqdm(*A						, **A	)




      def 					_A     (	self						:    List[str]						, *A						:    Tuple						, **A						:    List[Any]	):
             _UpperCAmelCase					:  Tuple											=   None
             if _tqdm_active:
                    return tqdm_lib.tqdm.set_lock(*A						, **A	)





      def 					_A     (	self						:    List[str]	):
             if _tqdm_active:
                    return tqdm_lib.tqdm.get_lock()

__SCREAMING_SNAKE_CASE	:					Union[str, Any]					=  _tqdm_cls()

def      UpperCamelCase_							( )   ->   bool:


       """simple docstring"""







       global _tqdm_active
       return bool(_tqdm_active   )

def      UpperCamelCase_							( )   ->   Optional[Any]:


       """simple docstring"""







       global _tqdm_active
       _UpperCAmelCase					:  List[str]											=   True


def      UpperCamelCase_							( )   ->   Optional[int]:


       """simple docstring"""







       global _tqdm_active
       _UpperCAmelCase					:  int											=   False


'''simple docstring'''




def      UpperCamelCase_							( _UpperCAmelCase  :				Optional[int]      ,     _UpperCAmelCase  :				List[Any]   )   ->   List[str]:


       """simple docstring"""







       if len(str(_UpperCAmelCase   )   ) == 1 or len(str(_UpperCAmelCase   )   ) == 1:
              return a * b

       _UpperCAmelCase					:  Any											=   max(len(str(_UpperCAmelCase   )   )      ,     len(str(_UpperCAmelCase   )   )   )
       _UpperCAmelCase					:  Any											=   ma // 2

       _UpperCAmelCase				,  _UpperCAmelCase					:  Union[str, Any]											=   divmod(_UpperCAmelCase      ,     10**ma   )
       _UpperCAmelCase				,  _UpperCAmelCase					:  int											=   divmod(_UpperCAmelCase      ,     10**ma   )

       _UpperCAmelCase					:  List[str]											=   karatsuba(_UpperCAmelCase      ,     _UpperCAmelCase   )
       _UpperCAmelCase					:  int											=   karatsuba((aa + aa)      ,     (ba + ba)   )
       _UpperCAmelCase					:  Any											=   karatsuba(_UpperCAmelCase      ,     _UpperCAmelCase   )

       return (z * 10 ** (2 * ma)) + ((y - z - x) * 10 ** (ma)) + (x)

def      UpperCamelCase_							( )   ->   List[str]:


       """simple docstring"""







       print(karatsuba(15_463      ,     23_489   )   )


if __name__ == "__main__":
  main()

