

def      A__					(			__A  :						float     ,				__A  :						list[float]			)					->float:
      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(_UpperCAmelCase			)			)
      return round(_UpperCAmelCase     ,				ndigits=2			)


if __name__ == "__main__":
   import doctest

   doctest.testmod()







'''simple docstring'''





from ..utils import DummyObject, requires_backends



class  snake_case__						(    metaclass=SCREAMING_SNAKE_CASE_				):
 A__				= ['''note_seq''']
 def __init__(   self						:							Tuple      ,     *__a						:							int      ,     **__a						:							List[str]  )      ->   Any:







       '''simple docstring'''
       requires_backends(self      ,     ['note_seq']  )
 @classmethod
 def A_   (   cls						:							Optional[Any]      ,     *__a						:							Optional[Any]      ,     **__a						:							List[str]  )      ->   Union[str, Any]:







       '''simple docstring'''
       requires_backends(cls      ,     ['note_seq']  )





 @classmethod
 def A_   (   cls						:							List[Any]      ,     *__a						:							Union[str, Any]      ,     **__a						:							List[str]  )      ->   Any:







       '''simple docstring'''
       requires_backends(cls      ,     ['note_seq']  )



