




'''simple docstring'''





from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Optional, Union

import pyarrow as pa


if TYPE_CHECKING:
			from .features import FeatureType

@dataclass
class        _a    :
					SCREAMING_SNAKE_CASE_							:   List[str]
					SCREAMING_SNAKE_CASE_							:   Optional[str]       =						None
					# Automatically constructed
					SCREAMING_SNAKE_CASE_							:   ClassVar[str]       =						"dict"
					SCREAMING_SNAKE_CASE_							:   ClassVar[Any]       =						None
					SCREAMING_SNAKE_CASE_							:   str       =						field(default="""Translation""" , init=__lowerCAmelCase , repr=__lowerCAmelCase							)






					def __call__(			self   )							->      Tuple:
										return pa.struct({lang: pa.string() for lang in sorted(self.languages   )}   )






					def     _lowercase     (			self   )							->      Union["FeatureType", Dict[str, "FeatureType"]]:
										from .features import Value

										return {k: Value("string"   ) for k in sorted(self.languages   )}







@dataclass
class        _a    :
					SCREAMING_SNAKE_CASE_							:   Optional[List]       =						None
					SCREAMING_SNAKE_CASE_							:   Optional[int]       =						None
					SCREAMING_SNAKE_CASE_							:   Optional[str]       =						None
					# Automatically constructed
					SCREAMING_SNAKE_CASE_							:   ClassVar[str]       =						"dict"
					SCREAMING_SNAKE_CASE_							:   ClassVar[Any]       =						None
					SCREAMING_SNAKE_CASE_							:   str       =						field(default="""TranslationVariableLanguages""" , init=__lowerCAmelCase , repr=__lowerCAmelCase							)






					def     _lowercase     (			self   )							->      Optional[Any]:
										_snake_case							=				sorted(set(self.languages   )   ) if self.languages else None
										_snake_case							=				len(self.languages   ) if self.languages else None






					def __call__(			self   )							->      Any:
										return pa.struct({"language": pa.list_(pa.string()   ), "translation": pa.list_(pa.string()   )}   )






					def     _lowercase     (			self ,_SCREAMING_SNAKE_CASE   )							->      Tuple:
										_snake_case							=				set(self.languages   )
										if self.languages and set(_SCREAMING_SNAKE_CASE   ) - lang_set:
															raise ValueError(
															    f"""Some languages in example ({', '.join(sorted(set(_SCREAMING_SNAKE_CASE   ) - lang_set   )   )}) are not in valid set ({', '.join(_SCREAMING_SNAKE_CASE   )})."""   )

										# Convert dictionary into tuples, splitting out cases where there are
										# multiple translations for a single language.
										_snake_case							=				[]
										for lang, text in translation_dict.items():
															if isinstance(_SCREAMING_SNAKE_CASE ,_SCREAMING_SNAKE_CASE   ):
																				translation_tuples.append((lang, text)   )
															else:
																				translation_tuples.extend([(lang, el) for el in text]   )

        # Ensure translations are in ascending order by language code.
										_snake_case							, _snake_case							=				zip(*sorted(_SCREAMING_SNAKE_CASE   )   )

										return {"language": languages, "translation": translations}






					def     _lowercase     (			self   )							->      Union["FeatureType", Dict[str, "FeatureType"]]:
										from .features import Sequence, Value

										return {
										    "language": Sequence(Value("string"   )   ),
										    "translation": Sequence(Value("string"   )   ),
										}








'''simple docstring'''





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





def      __a     (       _UpperCamelCase:   int   )						->			str:

     """simple docstring"""




     if not isinstance(_UpperCamelCase ,						_UpperCamelCase   ):
          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							=				426_880 * Decimal(10_005   ).sqrt()
     _snake_case							=				1
     _snake_case							=				13_591_409
     _snake_case							=				Decimal(_UpperCamelCase   )
     for k in range(1 ,						_UpperCamelCase   ):
          _snake_case							=				factorial(6 * k   ) // (factorial(3 * k   ) * factorial(_UpperCamelCase   ) ** 3)
          linear_term += 545_140_134
          exponential_term *= -262_537_412_640_768_000
          partial_sum += Decimal(multinomial_term * linear_term   ) / exponential_term
     return str(constant_term / partial_sum   )[:-1]


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


