






'''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


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

UpperCamelCase      					=logging.WARNING



def 				snake_case       (  )							->					Tuple:





      """simple docstring"""

      UpperCamelCase_					: List[str]            =				os.getenv("""DATASETS_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 DATASETS_VERBOSITY={env_level_str}, "
                      f"has to be one of: { ', '.join(log_levels.keys()						) }"						)
      return _default_log_level



def 				snake_case       (  )							->					str:





      """simple docstring"""

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



def 				snake_case       (  )							->					logging.Logger:





      """simple docstring"""

      return logging.getLogger(_get_library_name()						)



def 				snake_case       (  )							->					None:





      """simple docstring"""

      UpperCamelCase_					: Any            =				_get_library_root_logger()
      library_root_logger.setLevel(_get_default_logging_level()						)



def 				snake_case       (  )							->					None:





      """simple docstring"""

      UpperCamelCase_					: int            =				_get_library_root_logger()
      library_root_logger.setLevel(logging.NOTSET						)



def 				snake_case       (  a_				:			Optional[str] = None						)							->					logging.Logger:





      """simple docstring"""

      if name is None:
            UpperCamelCase_					: List[str]            =				_get_library_name()
      return logging.getLogger(a_						)



def 				snake_case       (  )							->					int:





      """simple docstring"""

      return _get_library_root_logger().getEffectiveLevel()



def 				snake_case       (  a_				:			int						)							->					None:





      """simple docstring"""

      _get_library_root_logger().setLevel(a_						)



def 				snake_case       (  )							->					Optional[Any]:





      """simple docstring"""

      return set_verbosity(a_						)



def 				snake_case       (  )							->					List[str]:





      """simple docstring"""

      return set_verbosity(a_						)



def 				snake_case       (  )							->					Optional[int]:





      """simple docstring"""

      return set_verbosity(a_						)



def 				snake_case       (  )							->					Dict:





      """simple docstring"""

      return set_verbosity(a_						)



def 				snake_case       (  )							->					None:





      """simple docstring"""

      UpperCamelCase_					: List[Any]            =				False



def 				snake_case       (  )							->					None:





      """simple docstring"""

      UpperCamelCase_					: List[str]            =				True


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




class      A     :






 """simple docstring"""





 def __init__(				self      ,  *__lowerCAmelCase      ,  **__lowerCAmelCase			):  # pylint: disable=unused-argument
       UpperCamelCase_					: int            =				args[0] if args else None
 def __iter__(				self			):
       return iter(self._iterator			)
 def __getattr__(				self      ,  __lowerCAmelCase			):

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

       return empty_fn
 def __enter__(				self			):
       return self





 def __exit__(				self      ,  __lowerCAmelCase      ,  __lowerCAmelCase      ,  __lowerCAmelCase			):
       return






UpperCamelCase      					=True




class      A     :






 """simple docstring"""





 def __call__(				self      ,  *__lowerCAmelCase      ,  __lowerCAmelCase=False      ,  **__lowerCAmelCase			):
       if _tqdm_active and not disable:
             return tqdm_lib.tqdm(*__lowerCAmelCase      ,  **__lowerCAmelCase			)
       else:
             return EmptyTqdm(*__lowerCAmelCase      ,  **__lowerCAmelCase			)
 def 	_UpperCAmelCase							(				self      ,  *__lowerCAmelCase      ,  **__lowerCAmelCase			):
       UpperCamelCase_					: Optional[Any]            =				None
       if _tqdm_active:
             return tqdm_lib.tqdm.set_lock(*__lowerCAmelCase      ,  **__lowerCAmelCase			)





 def 	_UpperCAmelCase							(				self			):
       if _tqdm_active:
             return tqdm_lib.tqdm.get_lock()






UpperCamelCase      					=_tqdm_cls()



def 				snake_case       (  )							->					bool:





      """simple docstring"""

      global _tqdm_active
      return bool(_tqdm_active						)



def 				snake_case       (  )							->					Optional[int]:





      """simple docstring"""

      global _tqdm_active
      UpperCamelCase_					: int            =				True



def 				snake_case       (  )							->					List[Any]:





      """simple docstring"""

      global _tqdm_active
      UpperCamelCase_					: Dict            =				False














'''simple docstring'''

from transformers import DistilBertTokenizer, DistilBertTokenizerFast
from transformers.testing_utils import require_tokenizers, slow

from ..bert.test_tokenization_bert import BertTokenizationTest




@require_tokenizers
class      A     (   SCREAMING_SNAKE_CASE__    ):






 """simple docstring"""





 __a      :    Optional[int]			  =    DistilBertTokenizer
 __a      :    Union[str, Any]			  =    DistilBertTokenizerFast
 __a      :    Any			  =    True
 @slow
 def 	_UpperCAmelCase							(				self			):
       UpperCamelCase_					: List[Any]            =				DistilBertTokenizer.from_pretrained("""distilbert-base-uncased"""			)

       UpperCamelCase_					: Dict            =				tokenizer.encode("""sequence builders"""      ,  add_special_tokens=__lowerCAmelCase			)
       UpperCamelCase_					: int            =				tokenizer.encode("""multi-sequence build"""      ,  add_special_tokens=__lowerCAmelCase			)

       UpperCamelCase_					: Union[str, Any]            =				tokenizer.build_inputs_with_special_tokens(__lowerCAmelCase			)
       UpperCamelCase_					: Dict            =				tokenizer.build_inputs_with_special_tokens(__lowerCAmelCase      ,  __lowerCAmelCase			)

       assert encoded_sentence == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id]
       assert encoded_pair == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] + text_a + [
           tokenizer.sep_token_id
       ]






