




def     lowerCAmelCase		(		_lowerCAmelCase				: int						):




 """simple docstring"""







 UpperCAmelCase__							=    1
 UpperCAmelCase__							=    0
 UpperCAmelCase__							=    1
 UpperCAmelCase__							=    1
 UpperCAmelCase__							=    3
 UpperCAmelCase__							=    3
 UpperCAmelCase__							=    limit
 UpperCAmelCase__							=    0

 UpperCAmelCase__							=    ""
 while counter != decimal + 1:
  if 4 * q + r - t < n * t:
   result += str(_lowerCAmelCase						)
   if counter == 0:
    result += "."

   if decimal == counter:
    break

   counter += 1
   UpperCAmelCase__							=    10 * (r - n * t)
   UpperCAmelCase__							=    ((10 * (3 * q + r)) // t) - 10 * n
   q *= 10
   UpperCAmelCase__							=    nr
  else:
   UpperCAmelCase__							=    (2 * q + r) * l
   UpperCAmelCase__							=    (q * (7 * k) + 2 + (r * l)) // (t * l)
   q *= k
   t *= l
   l += 2
   k += 1
   UpperCAmelCase__							=    nn
   UpperCAmelCase__							=    nr
 return result



def     lowerCAmelCase		(		):




 """simple docstring"""







 print(F'''{calculate_pi(50						) = }'''						)
 import doctest

 doctest.testmod()


if __name__ == "__main__":
  main()











from typing import Optional

from ..utils.logging import get_logger
from .audio_classificiation import AudioClassification
from .automatic_speech_recognition import AutomaticSpeechRecognition
from .base import TaskTemplate
from .image_classification import ImageClassification
from .language_modeling import LanguageModeling
from .question_answering import QuestionAnsweringExtractive
from .summarization import Summarization
from .text_classification import TextClassification


_lowerCAmelCase    : Any		= [
    "AutomaticSpeechRecognition",
    "AudioClassification",
    "ImageClassification",
    "LanguageModeling",
    "QuestionAnsweringExtractive",
    "Summarization",
    "TaskTemplate",
    "TextClassification",
]

_lowerCAmelCase    : Dict		= get_logger(__name__)


_lowerCAmelCase    : Optional[Any]		= {
    AutomaticSpeechRecognition.task: AutomaticSpeechRecognition,
    AudioClassification.task: AudioClassification,
    ImageClassification.task: ImageClassification,
    LanguageModeling.task: LanguageModeling,
    QuestionAnsweringExtractive.task: QuestionAnsweringExtractive,
    Summarization.task: Summarization,
    TextClassification.task: TextClassification,
}



def     lowerCAmelCase		(		_lowerCAmelCase				: dict						):




 """simple docstring"""







 UpperCAmelCase__							=    task_template_dict.get("task"						)
 if task_name is None:
  logger.warning(F'''Couldn\'t find template for task \'{task_name}\'. Available templates: {list(_lowerCAmelCase						)}'''						)
  return None
 UpperCAmelCase__							=    NAMEaTEMPLATE.get(_lowerCAmelCase						)
 return template.from_dict(_lowerCAmelCase						)





