
"""simple docstring"""






from typing import TYPE_CHECKING

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


UpperCamelCase_							=					{'configuration_vit': ['VIT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'ViTConfig', 'ViTOnnxConfig']}

try:
      if not is_vision_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase_							=					['ViTFeatureExtractor']
      UpperCamelCase_							=					['ViTImageProcessor']

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase_							=					[
          'VIT_PRETRAINED_MODEL_ARCHIVE_LIST',
          'ViTForImageClassification',
          'ViTForMaskedImageModeling',
          'ViTModel',
          'ViTPreTrainedModel',
      ]

try:
      if not is_tf_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase_							=					[
          'TFViTForImageClassification',
          'TFViTModel',
          'TFViTPreTrainedModel',
      ]

try:
      if not is_flax_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase_							=					[
          'FlaxViTForImageClassification',
          'FlaxViTModel',
          'FlaxViTPreTrainedModel',
      ]

if TYPE_CHECKING:
      from .configuration_vit import VIT_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTConfig, ViTOnnxConfig

      try:
            if not is_vision_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .feature_extraction_vit import ViTFeatureExtractor
            from .image_processing_vit import ViTImageProcessor

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_vit import (
                VIT_PRETRAINED_MODEL_ARCHIVE_LIST,
                ViTForImageClassification,
                ViTForMaskedImageModeling,
                ViTModel,
                ViTPreTrainedModel,
            )

      try:
            if not is_tf_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_tf_vit import TFViTForImageClassification, TFViTModel, TFViTPreTrainedModel

      try:
            if not is_flax_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_flax_vit import FlaxViTForImageClassification, FlaxViTModel, FlaxViTPreTrainedModel


else:
      import sys

      UpperCamelCase_							=					_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)


from decimal import Decimal, getcontext
from math import ceil, factorial


def   __SCREAMING_SNAKE_CASE					(SCREAMING_SNAKE_CASE__       ):

						if not isinstance(SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__       ):
												raise TypeError('''Undefined for non-integers'''       )
						elif precision < 1:
												raise ValueError('''Undefined for non-natural numbers'''       )

						snake_case_   =	precision
						snake_case_   =	ceil(precision / 14       )
						snake_case_   =	426880 * Decimal(10005       ).sqrt()
						snake_case_   =	1
						snake_case_   =	13591409
						snake_case_   =	Decimal(SCREAMING_SNAKE_CASE__       )
						for k in range(1  ,		SCREAMING_SNAKE_CASE__       ):
												snake_case_   =	factorial(6 * k       ) // (factorial(3 * k       ) * factorial(SCREAMING_SNAKE_CASE__       ) ** 3)
												linear_term += 545140134
												exponential_term *= -262537412640768000
												partial_sum += Decimal(multinomial_term * linear_term       ) / exponential_term
						return str(constant_term / partial_sum       )[:-1]


if __name__ == "__main__":
					lowerCAmelCase_       	=	50
					print(f"""The first {n} digits of pi is: {pi(n)}""")