





from decimal import Decimal, getcontext
from math import ceil, factorial
def      _A       (		SCREAMING_SNAKE_CASE     :   int						):





  """simple docstring"""



  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"						)

  a__	:					Tuple										=precision
  a__	:					List[Any]										=ceil(precision / 14						)
  a__	:					Tuple										=426_880 * Decimal(10_005						).sqrt()
  a__	:					List[Any]										=1
  a__	:					str										=13_591_409
  a__	:					Any										=Decimal(SCREAMING_SNAKE_CASE						)
  for k in range(1       ,       SCREAMING_SNAKE_CASE						):
    a__	:					Any										=factorial(6 * k						) // (factorial(3 * k						) * factorial(SCREAMING_SNAKE_CASE						) ** 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	:	Optional[int]		     =       50
     print(F"""The first {n} digits of pi is: {pi(n)}""")













'''simple docstring'''


import pytest

from datasets import inspect_metric, list_metrics, load_metric
@pytest.fixture
def 							UpperCAmelCase_  (						__lowerCamelCase					:					List[str] ):
   monkeypatch.setattr("datasets.utils.deprecation_utils._emitted_deprecation_warnings"	,set() )
@pytest.fixture
def 							UpperCAmelCase_  (						__lowerCamelCase					:					Any ):
   class       a_   :





        def __init__( self		:					int	,      lowercase		:					int						):





           """simple docstring"""




           lowercase_			:Optional[Any]    			= metric_id







   class       a_   :
        __A      =			[MetricMock(_lowerCAmelCase							) for metric_id in ["accuracy", "mse", "precision", "codeparrot/apps_metric"]]





        def 							lowercase__      ( self		:					Union[str, Any]						):





           """simple docstring"""




           return self._metrics







   monkeypatch.setattr("datasets.inspect.huggingface_hub"	,HfhMock() )


@pytest.mark.parametrize(
    "func, args"	,[(load_metric, ("metrics/mse",)), (list_metrics, ()), (inspect_metric, ("metrics/mse", "tmp_path"))] )
def 							UpperCAmelCase_  (						__lowerCamelCase					:					Union[str, Any]	,__lowerCamelCase					:					int	,__lowerCamelCase					:					Optional[int]	,__lowerCamelCase					:					Union[str, Any]	,__lowerCamelCase					:					Tuple ):
   if "tmp_path" in args:
      lowercase_			:Union[str, Any]    			= tuple(arg if arg != "tmp_path" else tmp_path for arg in args )
   with pytest.warns(__lowerCamelCase	,match="https://huggingface.co/docs/evaluate" ):
      func(*__lowerCamelCase )


