'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_torch_available,
    is_vision_available,
)


UpperCamelCase__  :						Any					=      {
    'configuration_mobilevit': ['MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MobileViTConfig', 'MobileViTOnnxConfig'],
}

try:
  if not is_vision_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCamelCase__  :						Tuple					=      ['MobileViTFeatureExtractor']
  UpperCamelCase__  :						Optional[Any]					=      ['MobileViTImageProcessor']

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCamelCase__  :						str					=      [
      'MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
      'MobileViTForImageClassification',
      'MobileViTForSemanticSegmentation',
      'MobileViTModel',
      'MobileViTPreTrainedModel',
  ]

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCamelCase__  :						List[Any]					=      [
      'TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
      'TFMobileViTForImageClassification',
      'TFMobileViTForSemanticSegmentation',
      'TFMobileViTModel',
      'TFMobileViTPreTrainedModel',
  ]

if TYPE_CHECKING:
  from .configuration_mobilevit import MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP, MobileViTConfig, MobileViTOnnxConfig

  try:
    if not is_vision_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .feature_extraction_mobilevit import MobileViTFeatureExtractor
    from .image_processing_mobilevit import MobileViTImageProcessor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_mobilevit import (
        MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
        MobileViTForImageClassification,
        MobileViTForSemanticSegmentation,
        MobileViTModel,
        MobileViTPreTrainedModel,
    )

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_mobilevit import (
        TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
        TFMobileViTForImageClassification,
        TFMobileViTForSemanticSegmentation,
        TFMobileViTModel,
        TFMobileViTPreTrainedModel,
    )


else:
  import sys

  UpperCamelCase__  :						Optional[Any]					=      _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)





'''simple docstring'''

from math import factorial, radians







def __UpperCamelCase( _A       :					float	,      _A       :					int = 18	,      _A       :					int = 10     ):
   '''simple docstring'''
   UpperCAmelCase__				:					int 					=	angle_in_degrees - ((angle_in_degrees // 3_6_0.0) * 3_6_0.0)

   # Converting from degrees to radians
   UpperCAmelCase__				:					Dict 					=	radians(_A     )

   UpperCAmelCase__				:					Union[str, Any] 					=	angle_in_radians
   UpperCAmelCase__				:					List[str] 					=	3
   UpperCAmelCase__				:					int 					=	-1

   for _ in range(_A     ):
      result += (b * (angle_in_radians**a)) / factorial(_A     )

      UpperCAmelCase__				:					List[str] 					=	-b  # One positive term and the next will be negative and so on...
      a += 2  # Increased by 2 for every term.

   return round(_A	,      _A     )


if __name__ == "__main__":
  __import__('doctest').testmod()




