



from collections import namedtuple

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

__lowerCamelCase								=   {
    """atm""": from_to(1, 1),
    """pascal""": from_to(0.0_00_00_98, 1_0_1_3_2_5),
    """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, 7_6_0),
}




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


if __name__ == "__main__":
    import doctest

    doctest.testmod()




import importlib.metadata
import subprocess
import sys




def       UpperCAmelCase__	(							__snake_case = False							)				->	List[Any]:
  _A          =      False
  if "IPython" in sys.modules:
    _A          =      '''google.colab''' in str(sys.modules['''IPython'''].get_ipython()							)

  if in_colab:
    if upgrade:
      _A          =      ['''pip''', '''install''', '''-U''', '''torch''']
      subprocess.run(__snake_case  ,			check=__snake_case							)
    # get the current version of torch
    _A          =      importlib.metadata.version('''torch'''							)
    _A          =      torch_version[: torch_version.rindex('''.'''							)]
    _A          =      F'''https://storage.googleapis.com/tpu-pytorch/wheels/colab/torch_xla-{torch_version_trunc}-cp37-cp37m-linux_x86_64.whl'''
    _A          =      ['''pip''', '''install''', xla_wheel]
    subprocess.run(__snake_case  ,			check=__snake_case							)
  else:
    raise RuntimeError('''`install_xla` utility works only on google colab.'''							)