





'''simple docstring'''






from typing import TYPE_CHECKING

from ...utils import _LazyModule


lowerCAmelCase									=   {'tokenization_byt5': ['ByT5Tokenizer']}


if TYPE_CHECKING:
					from .tokenization_byta import ByTaTokenizer
else:
					import sys

					lowerCAmelCase									=   _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)




'''simple docstring'''

def __UpperCamelCase( _A       :					float	,      _A       :					list[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'''     )
   UpperCAmelCase__				:					str 					=	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()




