





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available


A   : Any			=				{}

try:
					if not is_sentencepiece_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					A   : Union[str, Any]			=				['''GPTSw3Tokenizer''']


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

else:
					import sys

					A   : List[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()



