





from collections import namedtuple

UpperCAmelCase_											=  namedtuple("from_to", "from_ to")

UpperCAmelCase_											=  {
    "millimeter": "mm",
    "centimeter": "cm",
    "meter": "m",
    "kilometer": "km",
    "inch": "in",
    "inche": "in",  # Trailing 's' has been stripped off
    "feet": "ft",
    "foot": "ft",
    "yard": "yd",
    "mile": "mi",
}

UpperCAmelCase_											=  {
    "mm": from_to(0.001, 10_00),
    "cm": from_to(0.01, 1_00),
    "m": from_to(1, 1),
    "km": from_to(10_00, 0.001),
    "in": from_to(0.0254, 39.3701),
    "ft": from_to(0.3048, 3.2_8084),
    "yd": from_to(0.9144, 1.0_9361),
    "mi": from_to(1609.34, 0.0_0062_1371),
}
def     A__					(						SCREAMING_SNAKE_CASE_      :			float							,  SCREAMING_SNAKE_CASE_      :			str							,  SCREAMING_SNAKE_CASE_      :			str	)     ->     float:






   """simple docstring"""







   _UpperCAmelCase											=      from_type.lower().rstrip('''s'''	)
   _UpperCAmelCase											=      TYPE_CONVERSION.get(SCREAMING_SNAKE_CASE_							,  SCREAMING_SNAKE_CASE_	)
   _UpperCAmelCase											=      to_type.lower().rstrip('''s'''	)
   _UpperCAmelCase											=      TYPE_CONVERSION.get(SCREAMING_SNAKE_CASE_							,  SCREAMING_SNAKE_CASE_	)
   if new_from not in METRIC_CONVERSION:
      _UpperCAmelCase											=      (
          F'''Invalid \'from_type\' value: {from_type!r}.\n'''
          F'''Conversion abbreviations are: {', '.join(SCREAMING_SNAKE_CASE_	)}'''
      )
      raise ValueError(SCREAMING_SNAKE_CASE_	)
   if new_to not in METRIC_CONVERSION:
      _UpperCAmelCase											=      (
          F'''Invalid \'to_type\' value: {to_type!r}.\n'''
          F'''Conversion abbreviations are: {', '.join(SCREAMING_SNAKE_CASE_	)}'''
      )
      raise ValueError(SCREAMING_SNAKE_CASE_	)
   return value * METRIC_CONVERSION[new_from].from_ * METRIC_CONVERSION[new_to].to


if __name__ == "__main__":
   import doctest

   doctest.testmod()






def     A__					(						SCREAMING_SNAKE_CASE_      :			list	)     ->     bool:






   """simple docstring"""







   if not isinstance(SCREAMING_SNAKE_CASE_							,  SCREAMING_SNAKE_CASE_	):
      raise ValueError('''Input series is not valid, valid series - [1, 2/3, 2]'''	)
   if len(SCREAMING_SNAKE_CASE_	) == 0:
      raise ValueError('''Input list must be a non empty list'''	)
   if len(SCREAMING_SNAKE_CASE_	) == 1 and series[0] != 0:
      return True
   _UpperCAmelCase											=      []
   _UpperCAmelCase											=      len(SCREAMING_SNAKE_CASE_	)
   for i in range(0							,  SCREAMING_SNAKE_CASE_	):
      if series[i] == 0:
         raise ValueError('''Input series cannot have 0 as an element'''	)
      rec_series.append(1 / series[i]	)
   _UpperCAmelCase											=      rec_series[1] - rec_series[0]
   for index in range(2							,  SCREAMING_SNAKE_CASE_	):
      if rec_series[index] - rec_series[index - 1] != common_diff:
         return False
   return True
def     A__					(						SCREAMING_SNAKE_CASE_      :			list	)     ->     float:






   """simple docstring"""







   if not isinstance(SCREAMING_SNAKE_CASE_							,  SCREAMING_SNAKE_CASE_	):
      raise ValueError('''Input series is not valid, valid series - [2, 4, 6]'''	)
   if len(SCREAMING_SNAKE_CASE_	) == 0:
      raise ValueError('''Input list must be a non empty list'''	)
   _UpperCAmelCase											=      0
   for val in series:
      answer += 1 / val
   return len(SCREAMING_SNAKE_CASE_	) / answer


if __name__ == "__main__":
   import doctest

   doctest.testmod()