





"""simple docstring"""




import importlib.metadata
from typing import Union

from packaging.version import Version, parse

from .constants import STR_OPERATION_TO_FUNC


a						: List[Any]     	=			parse(importlib.metadata.version('''torch'''))






def       _SCREAMING_SNAKE_CASE		(	_lowercase						:    Union[str, Version]    ,       _lowercase						:    str    ,       _lowercase						:    str					) ->Union[str, Any]:






	'''simple docstring'''






	if operation not in STR_OPERATION_TO_FUNC.keys():
		raise ValueError(F"""`operation` must be one of {list(STR_OPERATION_TO_FUNC.keys()					)}, received {operation}"""					)
	a      :		Optional[Any]	=				STR_OPERATION_TO_FUNC[operation]
	if isinstance(_lowercase    ,       _lowercase					):
		a      :		List[Any]	=				parse(importlib.metadata.version(_lowercase					)					)
	return operation(_lowercase    ,       parse(_lowercase					)					)







def       _SCREAMING_SNAKE_CASE		(	_lowercase						:    str    ,       _lowercase						:    str					) ->int:






	'''simple docstring'''






	return compare_versions(_lowercase    ,       _lowercase    ,       _lowercase					)









"""simple docstring"""




def       _SCREAMING_SNAKE_CASE		(	_lowercase						:    float    ,       _lowercase						:    float					) ->float:






	'''simple docstring'''






	return price * (1 + tax_rate)


if __name__ == "__main__":
		print(F'''{price_plus_tax(100, 0.25) = }''')
		print(F'''{price_plus_tax(125.50, 0.05) = }''')


