
"""simple docstring"""






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.0_01, 1000),
    'cm': from_to(0.01, 100),
    'm': from_to(1, 1),
    'km': from_to(1000, 0.0_01),
    'in': from_to(0.02_54, 39.37_01),
    'ft': from_to(0.30_48, 3.2_80_84),
    'yd': from_to(0.91_44, 1.0_93_61),
    'mi': from_to(16_09.34, 0.0_00_62_13_71),
}
def    UpperCamelCase						(					UpperCAmelCase ,   UpperCAmelCase ,   UpperCAmelCase     )						->float:

   """simple docstring"""



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


if __name__ == "__main__":
      import doctest

      doctest.testmod()

"""simple docstring"""






from collections import namedtuple

UpperCamelCase_						   =   namedtuple('from_to', 'from_ to')

UpperCamelCase_						   =   {
    'atm': from_to(1, 1),
    'pascal': from_to(0.0_00_00_98, 101325),
    'bar': from_to(0.98_69_23, 1.0_13_25),
    'kilopascal': from_to(0.00_98_69_23, 1_01.3_25),
    'megapascal': from_to(9.8_69_23, 0.10_13_25),
    'psi': from_to(0.06_80_46, 14.69_59),
    'inHg': from_to(0.0_33_42_11, 29.92_13),
    'torr': from_to(0.00_13_15_79, 760),
}
def    UpperCamelCase						(					UpperCAmelCase ,   UpperCAmelCase ,   UpperCAmelCase     )						->float:

   """simple docstring"""



   if from_type not in PRESSURE_CONVERSION:
      raise ValueError(
          F'''Invalid \'from_type\' value: {from_type!r}  Supported values are:\n'''
          + ", ".join(UpperCAmelCase     )     )
   if to_type not in PRESSURE_CONVERSION:
      raise ValueError(
          F'''Invalid \'to_type\' value: {to_type!r}.  Supported values are:\n'''
          + ", ".join(UpperCAmelCase     )     )
   return (
       value * PRESSURE_CONVERSION[from_type].from_ * PRESSURE_CONVERSION[to_type].to
   )


if __name__ == "__main__":
      import doctest

      doctest.testmod()