




from __future__ import annotations

from collections.abc import Callable







def 	_a      (						SCREAMING_SNAKE_CASE_							:				Callable[[int | float], int | float]      ,      SCREAMING_SNAKE_CASE_							:				int | float      ,      SCREAMING_SNAKE_CASE_							:				int | float      ,      SCREAMING_SNAKE_CASE_							:				int = 1_00      ,      ):
					__lowerCAmelCase				   =       x_start
					__lowerCAmelCase				   =       fnc(SCREAMING_SNAKE_CASE_     )
					__lowerCAmelCase				   =       0.0
					for _ in range(SCREAMING_SNAKE_CASE_     ):
										# Approximates small segments of curve as linear and solve
										# for trapezoidal area
										__lowerCAmelCase				   =       (x_end - x_start) / steps + xa
										__lowerCAmelCase				   =       fnc(SCREAMING_SNAKE_CASE_     )
										area += abs(fxa + fxa     ) * (xa - xa) / 2
										# Increment step
										__lowerCAmelCase				   =       xa
										__lowerCAmelCase				   =       fxa
					return area


if __name__ == "__main__":







					def 	_a      (						SCREAMING_SNAKE_CASE_							:				Tuple     ):
										return x**3 + x**2

					print("""f(x) = x^3 + x^2""")
					print("""The area between the curve, x = -5, x = 5 and the x axis is:""")
					UpperCamelCase__    			=			10
					while i <= 100000:
										print(f'''with {i} steps: {trapezoidal_area(f, -5, 5, i)}''')
										i *= 10










from typing import TYPE_CHECKING

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


UpperCamelCase__    			=			{
    """configuration_audio_spectrogram_transformer""": [
        """AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """ASTConfig""",
    ]
}

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

try:
					if not is_speech_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCamelCase__    			=			["""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

					UpperCamelCase__    			=			_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)




