





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


A   : List[Any]			=				{
    '''configuration_upernet''': ['''UperNetConfig'''],
}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			A   : Optional[Any]			=				[
			    '''UperNetForSemanticSegmentation''',
			    '''UperNetPreTrainedModel''',
			]


if TYPE_CHECKING:
			from .configuration_upernet import UperNetConfig

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_upernet import UperNetForSemanticSegmentation, UperNetPreTrainedModel


else:
			import sys

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










def        __lowerCamelCase (							__a       :float   ,					__a       :list[float]   )		->    float:






		"""simple docstring"""

		if discount_rate < 0:
				raise ValueError("""Discount rate cannot be negative"""   )
		if not cash_flows:
				raise ValueError("""Cash flows list cannot be empty"""   )
		A__  				=       sum(
		    cash_flow / ((1 + discount_rate) ** i) for i, cash_flow in enumerate(__a   )   )
		return round(__a   ,					ndigits=2   )


if __name__ == "__main__":
					import doctest

					doctest.testmod()



