






"""simple docstring"""



from ..utils import DummyObject, requires_backends





class 					_UpperCAmelCase       ( metaclass=_A							):
					SCREAMING_SNAKE_CASE_		:				str							    =   ["transformers", "torch", "note_seq"]




					def __init__(				self     :						Tuple    ,						*A     :						List[str]    ,						**A     :						List[Any]   )  ->  str:
							requires_backends(self    ,						['''transformers''', '''torch''', '''note_seq''']   )




					@classmethod
					def   A  (				cls     :						Union[str, Any]    ,						*A     :						Any    ,						**A     :						Union[str, Any]   )  ->  str:
							requires_backends(cls    ,						['''transformers''', '''torch''', '''note_seq''']   )






					@classmethod
					def   A  (				cls     :						Tuple    ,						*A     :						Union[str, Any]    ,						**A     :						int   )  ->  Optional[int]:
							requires_backends(cls    ,						['''transformers''', '''torch''', '''note_seq''']   )










"""simple docstring"""





def  __A   (_SCREAMING_SNAKE_CASE     ,   _SCREAMING_SNAKE_CASE			)					->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'			)
  lowerCAmelCase__			:Union[str, Any]											=							sum(
      cash_flow / ((1 + discount_rate) ** i) for i, cash_flow in enumerate(_SCREAMING_SNAKE_CASE			)			)
  return round(_SCREAMING_SNAKE_CASE     ,   ndigits=2			)


if __name__ == "__main__":
  import doctest

  doctest.testmod()
