


'''simple docstring'''






import pytest

import datasets.config
from datasets.utils.info_utils import is_small_dataset





@pytest.mark.parametrize("""dataset_size"""				,      [None, 4_00 * 2**20, 6_00 * 2**20] )
@pytest.mark.parametrize("""input_in_memory_max_size"""				,      ["""default""", 0, 1_00 * 2**20, 9_00 * 2**20] )
def      UpperCAmelCase      (		lowerCamelCase_  :Union[str, Any]				,      lowerCamelCase_  :Optional[Any]				,      lowerCamelCase_  :Optional[Any] ):







		'''simple docstring'''
		if input_in_memory_max_size != "default":
				monkeypatch.setattr(datasets.config				,      """IN_MEMORY_MAX_SIZE"""				,      lowerCamelCase_ )
		snake_case_		:							List[str]			       =						datasets.config.IN_MEMORY_MAX_SIZE
		if input_in_memory_max_size == "default":
				assert in_memory_max_size == 0
		else:
				assert in_memory_max_size == input_in_memory_max_size
		if dataset_size and in_memory_max_size:
				snake_case_		:							Dict			       =						dataset_size < in_memory_max_size
		else:
				snake_case_		:							Tuple			       =						False
		snake_case_		:							int			       =						is_small_dataset(lowerCamelCase_ )
		assert result == expected



'''simple docstring'''






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_speech_available, is_torch_available


__A	:	Tuple     =     {
    'configuration_audio_spectrogram_transformer': [
        'AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'ASTConfig',
    ]
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__A	:	Tuple     =     [
							    'AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'ASTForAudioClassification',
							    'ASTModel',
							    'ASTPreTrainedModel',
							]

try:
							if not is_speech_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__A	:	int     =     ['ASTFeatureExtractor']

if TYPE_CHECKING:
							from .configuration_audio_spectrogram_transformer import (
							    AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
							    ASTConfig,
							)

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_audio_spectrogram_transformer import (
														    AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
														    ASTForAudioClassification,
														    ASTModel,
														    ASTPreTrainedModel,
														)

							try:
														if not is_speech_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .feature_extraction_audio_spectrogram_transformer import ASTFeatureExtractor


else:
							import sys

							__A	:	Union[str, Any]     =     _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)