



UpperCAmelCase__			:   Optional[int]      			=    1000


def 	_A	(   _UpperCamelCase			):
				return x * x


def 	_A	(   _UpperCamelCase      ,					_UpperCamelCase      ,					_UpperCamelCase      ,					_UpperCamelCase = 4			):
				assert callable(
				    _UpperCamelCase			), F'''the function(object) passed should be callable your input : {function}'''
				assert isinstance(_UpperCamelCase      ,					(float, int)			), F'''a should be float or integer your input : {a}'''
				assert isinstance(function(_UpperCamelCase			)      ,					(float, int)			), (
				    "the function should return integer or float return type of your function, "
				    F'''{type(_UpperCamelCase			)}'''
				)
				assert isinstance(_UpperCamelCase      ,					(float, int)			), F'''b should be float or integer your input : {b}'''
				assert (
				    isinstance(_UpperCamelCase      ,					_UpperCamelCase			) 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

				_UpperCAmelCase						:  str     					=	(b - a) / N_STEPS
				_UpperCAmelCase						:  List[str]     					=	function(_UpperCamelCase			) + function(_UpperCamelCase			)

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

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


if __name__ == "__main__":
					import doctest

					doctest.testmod()





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_tokenizers_available


UpperCAmelCase__			:   Optional[Any]      			=    {}

try:
					if not is_sentencepiece_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCAmelCase__			:   List[Any]      			=    ['MBart50Tokenizer']

try:
					if not is_tokenizers_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCAmelCase__			:   int      			=    ['MBart50TokenizerFast']


if TYPE_CHECKING:
					try:
										if not is_sentencepiece_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_mbartaa import MBartaaTokenizer

					try:
										if not is_tokenizers_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_mbartaa_fast import MBartaaTokenizerFast

else:
					import sys

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