






'''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					(     )       ->				str:





      """simple docstring"""

      UpperCamelCase_				:   Dict					    =							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_				:   int					    =							_get_library_root_logger()
      library_root_logger.setLevel(_get_default_logging_level()	)



def 							snake_case					(     )       ->				None:





      """simple docstring"""

      UpperCamelCase_				:   List[str]					    =							_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_				:   Any					    =							_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[int]:





      """simple docstring"""

      return set_verbosity(a_	)



def 							snake_case					(     )       ->				Optional[int]:





      """simple docstring"""

      return set_verbosity(a_	)



def 							snake_case					(     )       ->				Optional[Any]:





      """simple docstring"""

      return set_verbosity(a_	)



def 							snake_case					(     )       ->				Optional[Any]:





      """simple docstring"""

      return set_verbosity(a_	)



def 							snake_case					(     )       ->				None:





      """simple docstring"""

      UpperCamelCase_				:   Tuple					    =							False



def 							snake_case					(     )       ->				None:





      """simple docstring"""

      UpperCamelCase_				:   Dict					    =							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_				:   List[str]					    =							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_				:   str					    =							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					(     )       ->				int:





      """simple docstring"""

      global _tqdm_active
      UpperCamelCase_				:   Dict					    =							True



def 							snake_case					(     )       ->				Any:





      """simple docstring"""

      global _tqdm_active
      UpperCamelCase_				:   Optional[Any]					    =							False














'''simple docstring'''

import pytest

import datasets


# Import fixture modules as plugins
UpperCamelCase							=["tests.fixtures.files", "tests.fixtures.hub", "tests.fixtures.fsspec"]



def 							snake_case					(     a_							: List[str]    ,   a_							: Optional[Any]	)       ->				Union[str, Any]:





      """simple docstring"""

      for item in items:
            if any(marker in item.keywords for marker in ["""integration""", """unit"""]	):
                  continue
            item.add_marker(pytest.mark.unit	)



def 							snake_case					(     a_							: Optional[int]	)       ->				Optional[Any]:





      """simple docstring"""

      config.addinivalue_line("""markers"""    ,   """torchaudio_latest: mark test to run with torchaudio>=0.12"""	)



@pytest.fixture(autouse=a_	)
def 							snake_case					(     a_							: Any    ,   a_							: Optional[int]	)       ->				Tuple:





      """simple docstring"""

      UpperCamelCase_				:   Optional[Any]					    =							tmp_path_factory.getbasetemp() / """cache"""
      UpperCamelCase_				:   str					    =							test_hf_cache_home / """datasets"""
      UpperCamelCase_				:   Any					    =							test_hf_cache_home / """metrics"""
      UpperCamelCase_				:   List[Any]					    =							test_hf_cache_home / """modules"""
      monkeypatch.setattr("""datasets.config.HF_DATASETS_CACHE"""    ,   str(a_	)	)
      monkeypatch.setattr("""datasets.config.HF_METRICS_CACHE"""    ,   str(a_	)	)
      monkeypatch.setattr("""datasets.config.HF_MODULES_CACHE"""    ,   str(a_	)	)
      UpperCamelCase_				:   List[Any]					    =							test_hf_datasets_cache / """downloads"""
      monkeypatch.setattr("""datasets.config.DOWNLOADED_DATASETS_PATH"""    ,   str(a_	)	)
      UpperCamelCase_				:   Any					    =							test_hf_datasets_cache / """downloads""" / """extracted"""
      monkeypatch.setattr("""datasets.config.EXTRACTED_DATASETS_PATH"""    ,   str(a_	)	)



@pytest.fixture(autouse=a_    ,   scope="""session"""	)
def 							snake_case					(     )       ->				Any:





      """simple docstring"""

      datasets.disable_progress_bar()



@pytest.fixture(autouse=a_	)
def 							snake_case					(     a_							: Optional[int]	)       ->				Union[str, Any]:





      """simple docstring"""

      monkeypatch.setattr("""datasets.config.HF_UPDATE_DOWNLOAD_COUNTS"""    ,   a_	)



@pytest.fixture
def 							snake_case					(     a_							: int	)       ->				Union[str, Any]:





      """simple docstring"""

      monkeypatch.setattr("""sqlalchemy.util.deprecations.SILENCE_UBER_WARNING"""    ,   a_	)






