



A__			   = 10_00


def 	_UpperCAmelCase       (   snake_case    ):





     """simple docstring"""

     return x * x


def 	_UpperCAmelCase       (   snake_case			,		snake_case			,		snake_case			,		snake_case = 4    ):





     """simple docstring"""

     assert callable(
         snake_case    ), F'the function(object) passed should be callable your input : {function}'
     assert isinstance(snake_case			,		(float, int)    ), F'a should be float or integer your input : {a}'
     assert isinstance(function(snake_case    )			,		(float, int)    ), (
         "the function should return integer or float return type of your function, "
         F'{type(snake_case    )}'
     )
     assert isinstance(snake_case			,		(float, int)    ), F'b should be float or integer your input : {b}'
     assert (
         isinstance(snake_case			,		snake_case    ) and precision > 0
     ), F'precision should be positive integer your input : {precision}'

     # just applying the formula of simpson for approximate integration written in
     # mentioned article in first comment of this file and above this function

     _lowerCAmelCase      			=					(b - a) / N_STEPS
     _lowerCAmelCase      			=					function(snake_case    ) + function(snake_case    )

     for i in range(1			,		snake_case    ):
          _lowerCAmelCase      			=					a + h * i
          result += function(snake_case    ) * (4 if i % 2 else 2)

     result *= h / 3
     return round(snake_case			,		snake_case    )


if __name__ == "__main__":
 import doctest

 doctest.testmod()








from typing import TYPE_CHECKING

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


A__			   = {"""configuration_hubert""": ["""HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """HubertConfig"""]}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	A__			   = [
	    """HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """HubertForCTC""",
	    """HubertForSequenceClassification""",
	    """HubertModel""",
	    """HubertPreTrainedModel""",
	]


try:
	if not is_tf_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	A__			   = [
	    """TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """TFHubertForCTC""",
	    """TFHubertModel""",
	    """TFHubertPreTrainedModel""",
	]

if TYPE_CHECKING:
	from .configuration_hubert import HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, HubertConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_hubert import (
		    HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    HubertForCTC,
		    HubertForSequenceClassification,
		    HubertModel,
		    HubertPreTrainedModel,
		)

	try:
		if not is_tf_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_tf_hubert import (
		    TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TFHubertForCTC,
		    TFHubertModel,
		    TFHubertPreTrainedModel,
		)


else:
	import sys

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



