

"""simple docstring"""






import importlib.metadata
import subprocess
import sys
def       UpperCamelCase					(			_lowerCAmelCase     :						bool = False )				->			Dict:
	_UpperCAmelCase    :							Dict									=					False
	if "IPython" in sys.modules:
		_UpperCAmelCase    :							int									=					"""google.colab""" in str(sys.modules["""IPython"""].get_ipython() )

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








"""simple docstring"""






def       UpperCamelCase					(			_lowerCAmelCase     :						float,  _lowerCAmelCase     :						float )				->			float:
	_UpperCAmelCase    :							List[Any]									=					float()
	try:
		_UpperCAmelCase    :							Optional[Any]									=					mass * acceleration
	except Exception:
		return -0.0
	return force


if __name__ == "__main__":
						import doctest

						# run doctest
						doctest.testmod()

						# demo
						lowerCamelCase__				:  Any													=  12.5
						lowerCamelCase__				:  Union[str, Any]													=  10
						lowerCamelCase__				:  Optional[Any]													=  newtons_second_law_of_motion(mass, acceleration)
						print('''The force is ''', force, '''N''')





