






'''simple docstring'''



def    __UpperCAmelCase	(				SCREAMING_SNAKE_CASE__:	float,					SCREAMING_SNAKE_CASE__:	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(SCREAMING_SNAKE_CASE__    )    )
   return round(SCREAMING_SNAKE_CASE__,					ndigits=2    )


if __name__ == "__main__":
 import doctest

 doctest.testmod()








'''simple docstring'''



import warnings

from .generation import TFGenerationMixin
class 							__SCREAMING_SNAKE_CASE       (							_lowerCAmelCase     ):
      # warning at import time
      warnings.warn(
          "Importing `TFGenerationMixin` from `src/transformers/generation_tf_utils.py` is deprecated and will "
          "be removed in Transformers v5. Import as `from transformers import TFGenerationMixin` instead."      ,      _lowerCAmelCase      ,      )