



import math






def  UpperCAmelCase__    (    lowercase__						,       lowercase__   ) ->      float:

						if initial_intensity < 0:
												raise ValueError("""The value of intensity cannot be negative"""   )
												# handling of negative values of initial intensity
						if angle < 0 or angle > 360:
												raise ValueError("""In Malus Law, the angle is in the range 0-360 degrees"""   )
												# handling of values out of allowed range
						return initial_intensity * (math.cos(math.radians(lowercase__   )   ) ** 2)


if __name__ == "__main__":
			import doctest

			doctest.testmod(name="malus_law")










from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Features, Value
from .base import TaskTemplate
@dataclass(frozen=_UpperCAmelCase			)
class 			_lowerCAmelCase   ( _UpperCAmelCase			):






			"""simple docstring"""





			lowercase__      :  str      =			field(default="""summarization"""    ,					metadata={"""include_in_asdict_even_if_is_default""": True}			)
			lowercase__      :  ClassVar[Features]      =			Features({"""text""": Value("""string"""			)}			)
			lowercase__      :  ClassVar[Features]      =			Features({"""summary""": Value("""string"""			)}			)
			lowercase__      :  str      =			"text"
			lowercase__      :  str      =			"summary"





			@property
			def 		snake_case__			(				self	:       List[Any]   )						->					Dict[str, str]:
									"""simple docstring"""







									return {self.text_column: "text", self.summary_column: "summary"}





