
"""simple docstring"""
def  lowercase     (_lowerCAmelCase ,    _lowerCAmelCase						):
						# "extended trapezoidal rule"
						# int(f) = dx/2 * (f1 + 2f2 + ... + fn)
						__lowerCAmelCase     =  (boundary[1] - boundary[0]) / steps
						__lowerCAmelCase     =  boundary[0]
						__lowerCAmelCase     =  boundary[1]
						__lowerCAmelCase     =  make_points(_lowerCAmelCase ,    _lowerCAmelCase ,    _lowerCAmelCase						)
						__lowerCAmelCase     =  0.0
						y += (h / 2.0) * f(_lowerCAmelCase						)
						for i in x_i:
												# print(i)
												y += h * f(_lowerCAmelCase						)
						y += (h / 2.0) * f(_lowerCAmelCase						)
						return y

def  lowercase     (_lowerCAmelCase ,    _lowerCAmelCase ,    _lowerCAmelCase						):
						__lowerCAmelCase     =  a + h
						while x < (b - h):
												yield x
												__lowerCAmelCase     =  x + h

def  lowercase     (_lowerCAmelCase						):  # enter your function here
						__lowerCAmelCase     =  (x - 0) * (x - 0)
						return y

def  lowercase     ():
						__lowerCAmelCase     =  0.0  # Lower bound of integration
						__lowerCAmelCase     =  1.0  # Upper bound of integration
						__lowerCAmelCase     =  10.0  # define number of steps or resolution
						__lowerCAmelCase     =  [a, b]  # define boundary of integration
						__lowerCAmelCase     =  method_a(_lowerCAmelCase ,    _lowerCAmelCase						)
						print(f"""y = {y}"""						)


if __name__ == "__main__":
			main()


"""simple docstring"""
from typing import TYPE_CHECKING

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


SCREAMING_SNAKE_CASE_					     =	{
    '''configuration_rag''': ['''RagConfig'''],
    '''retrieval_rag''': ['''RagRetriever'''],
    '''tokenization_rag''': ['''RagTokenizer'''],
}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			SCREAMING_SNAKE_CASE_					     =	[
			    '''RagModel''',
			    '''RagPreTrainedModel''',
			    '''RagSequenceForGeneration''',
			    '''RagTokenForGeneration''',
			]

try:
			if not is_tf_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			SCREAMING_SNAKE_CASE_					     =	[
			    '''TFRagModel''',
			    '''TFRagPreTrainedModel''',
			    '''TFRagSequenceForGeneration''',
			    '''TFRagTokenForGeneration''',
			]


if TYPE_CHECKING:
			from .configuration_rag import RagConfig
			from .retrieval_rag import RagRetriever
			from .tokenization_rag import RagTokenizer

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_rag import RagModel, RagPreTrainedModel, RagSequenceForGeneration, RagTokenForGeneration

			try:
						if not is_tf_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_tf_rag import (
						    TFRagModel,
						    TFRagPreTrainedModel,
						    TFRagSequenceForGeneration,
						    TFRagTokenForGeneration,
						)

else:
			import sys

			SCREAMING_SNAKE_CASE_					     =	_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)
