





"""simple docstring"""
def 					__lowerCamelCase       (							a_					:		float			,       a_					:		float			,       a_					:		int							)      ->				float:
      if principal <= 0:
            raise Exception('''Principal borrowed must be > 0'''							)
      if rate_per_annum < 0:
            raise Exception('''Rate of interest must be >= 0'''							)
      if years_to_repay <= 0 or not isinstance(a_			,       a_							):
            raise Exception('''Years to repay must be an integer > 0'''							)

      # Yearly rate is divided by 12 to get monthly rate
      __SCREAMING_SNAKE_CASE       :str		    =  rate_per_annum / 12

      # Years to repay is multiplied by 12 to get number of payments as payment is monthly
      __SCREAMING_SNAKE_CASE       :int		    =  years_to_repay * 12

      return (
          principal
          * rate_per_month
          * (1 + rate_per_month) ** number_of_payments
          / ((1 + rate_per_month) ** number_of_payments - 1)
      )


if __name__ == "__main__":
  import doctest

  doctest.testmod()






"""simple docstring"""
from torch import nn






class  _SCREAMING_SNAKE_CASE(       nn.Module  ):




       def __init__(						self		,SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							)      ->				List[str]:





             """simple docstring"""






             super().__init__()
             __SCREAMING_SNAKE_CASE       :Tuple		    =  class_size
             __SCREAMING_SNAKE_CASE       :str		    =  embed_size
             # self.mlp1 = nn.Linear(embed_size, embed_size)
             # self.mlp2 = (nn.Linear(embed_size, class_size))
             __SCREAMING_SNAKE_CASE       :Optional[Any]		    =  nn.Linear(SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							)




       def    _UpperCamelCase					(						self		,SCREAMING_SNAKE_CASE__							)      ->				Optional[int]:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE       :Optional[Any]		    =  self.mlp(SCREAMING_SNAKE_CASE__							)
             return logits