





import importlib.metadata
from typing import Union

from packaging.version import Version, parse

from .constants import STR_OPERATION_TO_FUNC


__lowerCAmelCase :int     =    parse(importlib.metadata.version('torch'))







def    A				(							UpperCAmelCase  ,  UpperCAmelCase  ,  UpperCAmelCase				):
					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}"""				)
					_snake_case       :					Any				       =   STR_OPERATION_TO_FUNC[operation]
					if isinstance(UpperCAmelCase  ,  UpperCAmelCase				):
										_snake_case       :					Union[str, Any]				       =   parse(importlib.metadata.version(UpperCAmelCase				)				)
					return operation(UpperCAmelCase  ,  parse(UpperCAmelCase				)				)







def    A				(							UpperCAmelCase  ,  UpperCAmelCase				):
					return compare_versions(UpperCAmelCase  ,  UpperCAmelCase  ,  UpperCAmelCase				)






import re







def    A				(							UpperCAmelCase				):
					_snake_case       :					Any				       =   re.compile(R"^(\+91[\-\s]?)?[0]?(91)?[789]\d{9}$"				)
					if match := re.search(UpperCAmelCase  ,  UpperCAmelCase				):
										return match.string == phone
					return False


if __name__ == "__main__":
							print(indian_phone_validator('+918827897895'))