




import logging

from transformers import PretrainedConfig


_UpperCAmelCase	:						Tuple			=     logging.getLogger(__name__)


_UpperCAmelCase	:						Dict			=     {
    "bertabs-finetuned-cnndm": "https://huggingface.co/remi/bertabs-finetuned-cnndm-extractive-abstractive-summarization/resolve/main/config.json",
}




class    __lowerCAmelCase       (							lowerCAmelCase):
       _a 					=						'''bertabs'''






       def __init__(   self:					Union[str, Any]       ,					_lowerCAmelCase:					Any=3_05_22       ,					_lowerCAmelCase:					List[str]=5_12       ,					_lowerCAmelCase:					Tuple=6       ,					_lowerCAmelCase:					Tuple=5_12       ,					_lowerCAmelCase:					Any=8       ,					_lowerCAmelCase:					Any=5_12       ,					_lowerCAmelCase:					Dict=0.2       ,					_lowerCAmelCase:					Dict=6       ,					_lowerCAmelCase:					Union[str, Any]=7_68       ,					_lowerCAmelCase:					Optional[Any]=8       ,					_lowerCAmelCase:					int=20_48       ,					_lowerCAmelCase:					List[Any]=0.2       ,					**_lowerCAmelCase:					Dict       ,					):
         super().__init__(**__a				)

         lowercase    :List[str]      	=						vocab_size
         lowercase    :List[Any]      	=						max_pos

         lowercase    :Any      	=						enc_layers
         lowercase    :List[Any]      	=						enc_hidden_size
         lowercase    :int      	=						enc_heads
         lowercase    :Union[str, Any]      	=						enc_ff_size
         lowercase    :Union[str, Any]      	=						enc_dropout

         lowercase    :List[Any]      	=						dec_layers
         lowercase    :Union[str, Any]      	=						dec_hidden_size
         lowercase    :Any      	=						dec_heads
         lowercase    :Union[str, Any]      	=						dec_ff_size
         lowercase    :Union[str, Any]      	=						dec_dropout










def       UpperCAmelCase__  (     lowerCamelCase,			lowerCamelCase   ):
  if discount_rate < 0:
    raise ValueError("Discount rate cannot be negative"   )
  if not cash_flows:
    raise ValueError("Cash flows list cannot be empty"   )
  lowercase    :Dict      	=						sum(
      cash_flow / ((1 + discount_rate) ** i) for i, cash_flow in enumerate(lowerCamelCase   )   )
  return round(lowerCamelCase,			ndigits=2   )


if __name__ == "__main__":
     import doctest

     doctest.testmod()



