


"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__snake_case    					=					{
    'configuration_megatron_bert': ['MEGATRON_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MegatronBertConfig'],
}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   __snake_case    					=					[
       'MEGATRON_BERT_PRETRAINED_MODEL_ARCHIVE_LIST',
       'MegatronBertForCausalLM',
       'MegatronBertForMaskedLM',
       'MegatronBertForMultipleChoice',
       'MegatronBertForNextSentencePrediction',
       'MegatronBertForPreTraining',
       'MegatronBertForQuestionAnswering',
       'MegatronBertForSequenceClassification',
       'MegatronBertForTokenClassification',
       'MegatronBertModel',
       'MegatronBertPreTrainedModel',
   ]

if TYPE_CHECKING:
   from .configuration_megatron_bert import MEGATRON_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, MegatronBertConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_megatron_bert import (
          MEGATRON_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
          MegatronBertForCausalLM,
          MegatronBertForMaskedLM,
          MegatronBertForMultipleChoice,
          MegatronBertForNextSentencePrediction,
          MegatronBertForPreTraining,
          MegatronBertForQuestionAnswering,
          MegatronBertForSequenceClassification,
          MegatronBertForTokenClassification,
          MegatronBertModel,
          MegatronBertPreTrainedModel,
      )

else:
   import sys

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



"""simple docstring"""


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


def    _lowerCamelCase   (     lowerCamelCase__	:							int  ):

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

 lowercase__       :       List[str]				=						precision
 lowercase__       :       Optional[int]				=						ceil(precision / 14  )
 lowercase__       :       Union[str, Any]				=						42_68_80 * Decimal(1_00_05  ).sqrt()
 lowercase__       :       Optional[Any]				=						1
 lowercase__       :       Optional[Any]				=						13_59_14_09
 lowercase__       :       List[Any]				=						Decimal(lowerCamelCase__  )
 for k in range(1       ,		lowerCamelCase__  ):
  lowercase__       :       Optional[int]				=						factorial(6 * k  ) // (factorial(3 * k  ) * factorial(lowerCamelCase__  ) ** 3)
  linear_term += 5_45_14_01_34
  exponential_term *= -26_25_37_41_26_40_76_80_00
  partial_sum += Decimal(multinomial_term * linear_term  ) / exponential_term
 return str(constant_term / partial_sum  )[:-1]


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