





"""simple docstring"""


def      UpperCamelCase							(SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE     ):
						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(SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE     ):
												raise Exception("""Years to repay must be an integer > 0"""     )

						# Yearly rate is divided by 12 to get monthly rate
						UpperCamelCase				:		Dict				   =			rate_per_annum / 12

						# Years to repay is multiplied by 12 to get number of payments as payment is monthly
						UpperCamelCase				:		List[Any]				   =			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()











from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


A__      :     Optional[int]       =					{
    'configuration_clap': [
        'CLAP_PRETRAINED_MODEL_ARCHIVE_LIST',
        'ClapAudioConfig',
        'ClapConfig',
        'ClapTextConfig',
    ],
    'processing_clap': ['ClapProcessor'],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							A__      :     str       =					[
							    'CLAP_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'ClapModel',
							    'ClapPreTrainedModel',
							    'ClapTextModel',
							    'ClapTextModelWithProjection',
							    'ClapAudioModel',
							    'ClapAudioModelWithProjection',
							]
							A__      :     List[Any]       =					['ClapFeatureExtractor']

if TYPE_CHECKING:
							from .configuration_clap import (
							    CLAP_PRETRAINED_MODEL_ARCHIVE_LIST,
							    ClapAudioConfig,
							    ClapConfig,
							    ClapTextConfig,
							)
							from .processing_clap import ClapProcessor

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .feature_extraction_clap import ClapFeatureExtractor
														from .modeling_clap import (
														    CLAP_PRETRAINED_MODEL_ARCHIVE_LIST,
														    ClapAudioModel,
														    ClapAudioModelWithProjection,
														    ClapModel,
														    ClapPreTrainedModel,
														    ClapTextModel,
														    ClapTextModelWithProjection,
														)


else:
							import sys

							A__      :     int       =					_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)




