



from __future__ import annotations

from collections.abc import Callable






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


if __name__ == "__main__":






	def 				SCREAMING_SNAKE_CASE__							(       UpperCamelCase__:							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:')
	_lowerCamelCase   				=			10
	while i <= 100000:
		print(F'''with {i} steps: {trapezoidal_area(f, -5, 5, i)}''')
		i *= 10






import inspect
import unittest




class   UpperCamelCase_       (     unittest.TestCase    ):


							def      _snake_case  (							self    :str		)   ->   Union[str, Any]:



									"""simple docstring"""



									try:
											import diffusers  # noqa: F401
									except ImportError:
											assert False


							def      _snake_case  (							self    :Any		)   ->   Any:



									"""simple docstring"""



									import diffusers
									from diffusers.dependency_versions_table import deps

									SCREAMING_SNAKE_CASE__			=      inspect.getmembers(__A							,				inspect.isclass		)

									for cls_name, cls_module in all_classes:
											if "dummy_" in cls_module.__module__:
													for backend in cls_module._backends:
															if backend == "k_diffusion":
																	SCREAMING_SNAKE_CASE__			=      """k-diffusion"""
															elif backend == "invisible_watermark":
																	SCREAMING_SNAKE_CASE__			=      """invisible-watermark"""
															assert backend in deps, f'''{backend} is not in the deps table!'''