code: 
  
  
  '''simple docstring'''
  
  
  
  
  from copy import deepcopy
  from unittest.case import TestCase
  
  import pytest
  
  from datasets.arrow_dataset import Dataset
  from datasets.features import Audio, ClassLabel, Features, Image, Sequence, Value
  from datasets.info import DatasetInfo
  from datasets.tasks import (
      AudioClassification,
      AutomaticSpeechRecognition,
      ImageClassification,
      LanguageModeling,
      QuestionAnsweringExtractive,
      Summarization,
      TextClassification,
      task_template_from_dict,
  )
  from datasets.utils.py_utils import asdict
  
  
  __lowercase  :      List[Any]      		=				{
      'id': '5733be284776f41900661182',
      'title': 'University_of_Notre_Dame',
      'context': 'Architecturally, the school has a Catholic character. Atop the Main Building\'s gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend "Venite Ad Me Omnes". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive (and in a direct line that connects through 3 statues and the Gold Dome), is a simple, modern stone statue of Mary.',
      'question': 'To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France?',
      'answers': {'text': ['Saint Bernadette Soubirous'], 'answer_start': [5_15]},
  }
  
  
  
  
  
  @pytest.mark.parametrize(
      "task_cls"							,						[
          AudioClassification,
          AutomaticSpeechRecognition,
          ImageClassification,
          LanguageModeling,
          QuestionAnsweringExtractive,
          Summarization,
          TextClassification,
      ]							,						)
  def 							a_       (						lowercase    )			->str:
  
  
  
  
  
  
  				'''simple docstring'''
  
  				__lowerCamelCase		:      int											=					task_cls()
  				__lowerCamelCase		:      Dict											=					asdict(_SCREAMING_SNAKE_CASE    )
  				__lowerCamelCase		:      int											=					task_template_from_dict(_SCREAMING_SNAKE_CASE    )
  				assert task == reloaded
  
  
  
  
  
  class 							_snake_case   :
  							"""simple docstring"""
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->List[str]:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      Dict											=					LanguageModeling(text_column="input_text"	)
  											assert {"input_text": "text"} == task.column_mapping
  
  
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->List[str]:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      str											=					Features({"text": Value("string"	)}	)
  											__lowerCamelCase		:      List[Any]											=					{'text_column': 'input_text'}
  											__lowerCamelCase		:      Dict											=					LanguageModeling.from_dict(__a	)
  											assert "language-modeling" == task.task
  											assert input_schema == task.input_schema
  
  
  
  
  
  class 							_snake_case   ( lowerCAmelCase_   ):
  							"""simple docstring"""
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->Optional[int]:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      Any											=					sorted(["pos", "neg"]	)
  
  
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->str:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      List[str]											=					TextClassification(text_column="input_text"			,				label_column="input_label"	)
  											self.assertDictEqual({"input_text": "text", "input_label": "labels"}			,				task.column_mapping	)
  
  
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->Optional[Any]:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      Optional[int]											=					Features({"text": Value("string"	)}	)
  											# Labels are cast to tuple during `TextClassification.__post_init__`, so we do the same here
  											__lowerCamelCase		:      Any											=					Features({"labels": ClassLabel}	)
  											__lowerCamelCase		:      List[str]											=					{'text_column': 'input_text', 'label_column': 'input_labels'}
  											__lowerCamelCase		:      str											=					TextClassification.from_dict(__a	)
  											self.assertEqual("text-classification"			,				task.task	)
  											self.assertEqual(__a			,				task.input_schema	)
  											self.assertEqual(__a			,				task.label_schema	)
  
  
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->List[str]:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      Any											=					TextClassification(text_column="input_text"			,				label_column="input_label"	)
  											self.assertEqual(task.label_schema["labels"]			,				__a	)
  											__lowerCamelCase		:      int											=					task.align_with_features(Features({"input_label": ClassLabel(names=self.labels	)}	)	)
  											self.assertEqual(task.label_schema["labels"]			,				ClassLabel(names=self.labels	)	)
  
  
  
  
  
  class 							_snake_case   ( lowerCAmelCase_   ):
  							"""simple docstring"""
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->Optional[Any]:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      str											=					QuestionAnsweringExtractive(
  											    context_column="input_context"			,				question_column="input_question"			,				answers_column="input_answers"	)
  											self.assertDictEqual(
  											    {"input_context": "context", "input_question": "question", "input_answers": "answers"}			,				task.column_mapping	)
  
  
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->List[str]:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      Dict											=					Features({"question": Value("string"	), "context": Value("string"	)}	)
  											__lowerCamelCase		:      Optional[int]											=					Features(
  											    {
  											        "answers": Sequence(
  											            {
  											                "text": Value("string"	),
  											                "answer_start": Value("int32"	),
  											            }	)
  											    }	)
  											__lowerCamelCase		:      Optional[int]											=					{
  											    'context_column': 'input_input_context',
  											    'question_column': 'input_question',
  											    'answers_column': 'input_answers',
  											}
  											__lowerCamelCase		:      int											=					QuestionAnsweringExtractive.from_dict(__a	)
  											self.assertEqual("question-answering-extractive"			,				task.task	)
  											self.assertEqual(__a			,				task.input_schema	)
  											self.assertEqual(__a			,				task.label_schema	)
  
  
  
  
  
  class 							_snake_case   ( lowerCAmelCase_   ):
  							"""simple docstring"""
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->Any:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      List[str]											=					Summarization(text_column="input_text"			,				summary_column="input_summary"	)
  											self.assertDictEqual({"input_text": "text", "input_summary": "summary"}			,				task.column_mapping	)
  
  
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->List[Any]:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      Optional[int]											=					Features({"text": Value("string"	)}	)
  											__lowerCamelCase		:      Any											=					Features({"summary": Value("string"	)}	)
  											__lowerCamelCase		:      Tuple											=					{'text_column': 'input_text', 'summary_column': 'input_summary'}
  											__lowerCamelCase		:      Tuple											=					Summarization.from_dict(__a	)
  											self.assertEqual("summarization"			,				task.task	)
  											self.assertEqual(__a			,				task.input_schema	)
  											self.assertEqual(__a			,				task.label_schema	)
  
  
  
  
  
  class 							_snake_case   ( lowerCAmelCase_   ):
  							"""simple docstring"""
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->Optional[Any]:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      Any											=					AutomaticSpeechRecognition(audio_column="input_audio"			,				transcription_column="input_transcription"	)
  											self.assertDictEqual({"input_audio": "audio", "input_transcription": "transcription"}			,				task.column_mapping	)
  
  
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->Dict:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      Optional[int]											=					Features({"audio": Audio()}	)
  											__lowerCamelCase		:      Tuple											=					Features({"transcription": Value("string"	)}	)
  											__lowerCamelCase		:      List[str]											=					{
  											    'audio_column': 'input_audio',
  											    'transcription_column': 'input_transcription',
  											}
  											__lowerCamelCase		:      Tuple											=					AutomaticSpeechRecognition.from_dict(__a	)
  											self.assertEqual("automatic-speech-recognition"			,				task.task	)
  											self.assertEqual(__a			,				task.input_schema	)
  											self.assertEqual(__a			,				task.label_schema	)
  
  
  
  
  
  class 							_snake_case   ( lowerCAmelCase_   ):
  							"""simple docstring"""
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->Optional[Any]:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      Tuple											=					sorted(["pos", "neg"]	)
  
  
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->Dict:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      Optional[Any]											=					AudioClassification(audio_column="input_audio"			,				label_column="input_label"	)
  											self.assertDictEqual({"input_audio": "audio", "input_label": "labels"}			,				task.column_mapping	)
  
  
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->int:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      List[Any]											=					Features({"audio": Audio()}	)
  											__lowerCamelCase		:      Dict											=					Features({"labels": ClassLabel}	)
  											__lowerCamelCase		:      Union[str, Any]											=					{
  											    'audio_column': 'input_image',
  											    'label_column': 'input_label',
  											}
  											__lowerCamelCase		:      Optional[int]											=					AudioClassification.from_dict(__a	)
  											self.assertEqual("audio-classification"			,				task.task	)
  											self.assertEqual(__a			,				task.input_schema	)
  											self.assertEqual(__a			,				task.label_schema	)
  
  
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->Tuple:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      Dict											=					AudioClassification(audio_column="input_audio"			,				label_column="input_label"	)
  											self.assertEqual(task.label_schema["labels"]			,				__a	)
  											__lowerCamelCase		:      int											=					task.align_with_features(Features({"input_label": ClassLabel(names=self.labels	)}	)	)
  											self.assertEqual(task.label_schema["labels"]			,				ClassLabel(names=self.labels	)	)
  
  
  
  
  
  class 							_snake_case   ( lowerCAmelCase_   ):
  							"""simple docstring"""
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->str:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      str											=					sorted(["pos", "neg"]	)
  
  
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->Union[str, Any]:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      Optional[Any]											=					ImageClassification(image_column="input_image"			,				label_column="input_label"	)
  											self.assertDictEqual({"input_image": "image", "input_label": "labels"}			,				task.column_mapping	)
  
  
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->Optional[Any]:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      Optional[int]											=					Features({"image": Image()}	)
  											__lowerCamelCase		:      List[str]											=					Features({"labels": ClassLabel}	)
  											__lowerCamelCase		:      Union[str, Any]											=					{
  											    'image_column': 'input_image',
  											    'label_column': 'input_label',
  											}
  											__lowerCamelCase		:      Optional[int]											=					ImageClassification.from_dict(__a	)
  											self.assertEqual("image-classification"			,				task.task	)
  											self.assertEqual(__a			,				task.input_schema	)
  											self.assertEqual(__a			,				task.label_schema	)
  
  
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->List[str]:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      List[Any]											=					ImageClassification(image_column="input_image"			,				label_column="input_label"	)
  											self.assertEqual(task.label_schema["labels"]			,				__a	)
  											__lowerCamelCase		:      Optional[Any]											=					task.align_with_features(Features({"input_label": ClassLabel(names=self.labels	)}	)	)
  											self.assertEqual(task.label_schema["labels"]			,				ClassLabel(names=self.labels	)	)
  
  
  
  
  
  class 							_snake_case   ( lowerCAmelCase_   ):
  							"""simple docstring"""
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->Tuple:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      Union[str, Any]											=					DatasetInfo(task_templates=QuestionAnsweringExtractive()	)
  											__lowerCamelCase		:      Optional[int]											=					Dataset.from_dict({k: [v] for k, v in SAMPLE_QUESTION_ANSWERING_EXTRACTIVE.items()}			,				info=__a	)
  											assert isinstance(dataset.info.task_templates			,				__a	)
  											assert len(dataset.info.task_templates	) == 1
  
  											def keep_task(__A	):
  															return x
  
  											def dont_keep_task(__A	):
  															__lowerCamelCase		:      Any											=					deepcopy(__a	)
  															__lowerCamelCase		:      Tuple											=					0
  															return out
  
  											__lowerCamelCase		:      Tuple											=					dataset.map(__a	)
  											assert mapped_dataset.info.task_templates == dataset.info.task_templates
  											# reload from cache
  											__lowerCamelCase		:      Dict											=					dataset.map(__a	)
  											assert mapped_dataset.info.task_templates == dataset.info.task_templates
  
  											__lowerCamelCase		:      Any											=					dataset.map(__a	)
  											assert mapped_dataset.info.task_templates == []
  											# reload from cache
  											__lowerCamelCase		:      Union[str, Any]											=					dataset.map(__a	)
  											assert mapped_dataset.info.task_templates == []
  
  
  
  
  
  
  
  							def 		__SCREAMING_SNAKE_CASE(   self	)     ->Any:
  
  
  
  											"""simple docstring"""
  
  
  
  
  
  
  
  											__lowerCamelCase		:      Any											=					Features({"text": Value("string"	), "label": ClassLabel(names=("pos", "neg")	)}	)
  											__lowerCamelCase		:      List[Any]											=					TextClassification(text_column="text"			,				label_column="label"	)
  											__lowerCamelCase		:      Dict											=					DatasetInfo(features=__a			,				task_templates=__a	)
  											__lowerCamelCase		:      Optional[int]											=					Dataset.from_dict({"text": ["A sentence."], "label": ["pos"]}			,				info=__a	)
  
  											def process(__A	):
  															return example
  
  											__lowerCamelCase		:      Dict											=					dataset.remove_columns("label"	)
  											__lowerCamelCase		:      Optional[int]											=					modified_dataset.map(__a	)
  											assert mapped_dataset.info.task_templates == []
  
  
  
  
  
  
style_context: 
  
  
  '''simple docstring'''
  
  
  
  
  import os
  
  import requests
  
  __lowercase  :      int      		=				"""https://www.amdoren.com/api/currency.php"""
  
  
  # Currency and their description
  __lowercase  :      Optional[int]      		=				"""
  AED	United Arab Emirates Dirham
  AFN	Afghan Afghani
  ALL	Albanian Lek
  AMD	Armenian Dram
  ANG	Netherlands Antillean Guilder
  AOA	Angolan Kwanza
  ARS	Argentine Peso
  AUD	Australian Dollar
  AWG	Aruban Florin
  AZN	Azerbaijani Manat
  BAM	Bosnia & Herzegovina Convertible Mark
  BBD	Barbadian Dollar
  BDT	Bangladeshi Taka
  BGN	Bulgarian Lev
  BHD	Bahraini Dinar
  BIF	Burundian Franc
  BMD	Bermudian Dollar
  BND	Brunei Dollar
  BOB	Bolivian Boliviano
  BRL	Brazilian Real
  BSD	Bahamian Dollar
  BTN	Bhutanese Ngultrum
  BWP	Botswana Pula
  BYN	Belarus Ruble
  BZD	Belize Dollar
  CAD	Canadian Dollar
  CDF	Congolese Franc
  CHF	Swiss Franc
  CLP	Chilean Peso
  CNY	Chinese Yuan
  COP	Colombian Peso
  CRC	Costa Rican Colon
  CUC	Cuban Convertible Peso
  CVE	Cape Verdean Escudo
  CZK	Czech Republic Koruna
  DJF	Djiboutian Franc
  DKK	Danish Krone
  DOP	Dominican Peso
  DZD	Algerian Dinar
  EGP	Egyptian Pound
  ERN	Eritrean Nakfa
  ETB	Ethiopian Birr
  EUR	Euro
  FJD	Fiji Dollar
  GBP	British Pound Sterling
  GEL	Georgian Lari
  GHS	Ghanaian Cedi
  GIP	Gibraltar Pound
  GMD	Gambian Dalasi
  GNF	Guinea Franc
  GTQ	Guatemalan Quetzal
  GYD	Guyanaese Dollar
  HKD	Hong Kong Dollar
  HNL	Honduran Lempira
  HRK	Croatian Kuna
  HTG	Haiti Gourde
  HUF	Hungarian Forint
  IDR	Indonesian Rupiah
  ILS	Israeli Shekel
  INR	Indian Rupee
  IQD	Iraqi Dinar
  IRR	Iranian Rial
  ISK	Icelandic Krona
  JMD	Jamaican Dollar
  JOD	Jordanian Dinar
  JPY	Japanese Yen
  KES	Kenyan Shilling
  KGS	Kyrgystani Som
  KHR	Cambodian Riel
  KMF	Comorian Franc
  KPW	North Korean Won
  KRW	South Korean Won
  KWD	Kuwaiti Dinar
  KYD	Cayman Islands Dollar
  KZT	Kazakhstan Tenge
  LAK	Laotian Kip
  LBP	Lebanese Pound
  LKR	Sri Lankan Rupee
  LRD	Liberian Dollar
  LSL	Lesotho Loti
  LYD	Libyan Dinar
  MAD	Moroccan Dirham
  MDL	Moldovan Leu
  MGA	Malagasy Ariary
  MKD	Macedonian Denar
  MMK	Myanma Kyat
  MNT	Mongolian Tugrik
  MOP	Macau Pataca
  MRO	Mauritanian Ouguiya
  MUR	Mauritian Rupee
  MVR	Maldivian Rufiyaa
  MWK	Malawi Kwacha
  MXN	Mexican Peso
  MYR	Malaysian Ringgit
  MZN	Mozambican Metical
  NAD	Namibian Dollar
  NGN	Nigerian Naira
  NIO	Nicaragua Cordoba
  NOK	Norwegian Krone
  NPR	Nepalese Rupee
  NZD	New Zealand Dollar
  OMR	Omani Rial
  PAB	Panamanian Balboa
  PEN	Peruvian Nuevo Sol
  PGK	Papua New Guinean Kina
  PHP	Philippine Peso
  PKR	Pakistani Rupee
  PLN	Polish Zloty
  PYG	Paraguayan Guarani
  QAR	Qatari Riyal
  RON	Romanian Leu
  RSD	Serbian Dinar
  RUB	Russian Ruble
  RWF	Rwanda Franc
  SAR	Saudi Riyal
  SBD	Solomon Islands Dollar
  SCR	Seychellois Rupee
  SDG	Sudanese Pound
  SEK	Swedish Krona
  SGD	Singapore Dollar
  SHP	Saint Helena Pound
  SLL	Sierra Leonean Leone
  SOS	Somali Shilling
  SRD	Surinamese Dollar
  SSP	South Sudanese Pound
  STD	Sao Tome and Principe Dobra
  SYP	Syrian Pound
  SZL	Swazi Lilangeni
  THB	Thai Baht
  TJS	Tajikistan Somoni
  TMT	Turkmenistani Manat
  TND	Tunisian Dinar
  TOP	Tonga Paanga
  TRY	Turkish Lira
  TTD	Trinidad and Tobago Dollar
  TWD	New Taiwan Dollar
  TZS	Tanzanian Shilling
  UAH	Ukrainian Hryvnia
  UGX	Ugandan Shilling
  USD	United States Dollar
  UYU	Uruguayan Peso
  UZS	Uzbekistan Som
  VEF	Venezuelan Bolivar
  VND	Vietnamese Dong
  VUV	Vanuatu Vatu
  WST	Samoan Tala
  XAF	Central African CFA franc
  XCD	East Caribbean Dollar
  XOF	West African CFA franc
  XPF	CFP Franc
  YER	Yemeni Rial
  ZAR	South African Rand
  ZMW	Zambian Kwacha
  """
  
  
  
  
  
  def 							a_       (						lowercase = "USD"							,						lowercase = "INR"							,						lowercase = 1.0							,						lowercase = ""    )			->str:
  
  
  
  
  
  
  				'''simple docstring'''
  
  				__lowerCamelCase		:      str											=					locals()
  				# from is a reserved keyword
  				__lowerCamelCase		:      List[str]											=					params.pop("from_"    )
  				__lowerCamelCase		:      str											=					requests.get(lowercase							,						params=lowercase    ).json()
  				return str(res["amount"]    ) if res["error"] == 0 else res["error_message"]
  
  
  if __name__ == "__main__":
  				__lowercase  :      Any      		=				os.getenv("""CI""", """""")
  				__lowercase  :      List[str]      		=				os.getenv("""AMDOREN_API_KEY""", """""")
  
  				if not API_KEY and not TESTING:
  								raise KeyError(
  								    """API key must be provided in the 'AMDOREN_API_KEY' environment variable."""
  								)
  
  				print(
  				    convert_currency(
  				        input("""Enter from currency: """).strip(),
  				        input("""Enter to currency: """).strip(),
  				        float(input("""Enter the amount: """).strip()),
  				        API_KEY,
  				    )
  				)
  
  
  
  
  
  