
"""simple docstring"""







import importlib.metadata
from typing import Union

from packaging.version import Version, parse

from .constants import STR_OPERATION_TO_FUNC


lowerCamelCase__        =		parse(importlib.metadata.version("""torch"""))
def    __lowerCAmelCase    (_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}"		)
	__lowerCAmelCase      :						Union[str, Any]						      =				STR_OPERATION_TO_FUNC[operation]
	if isinstance(_UpperCamelCase	,  _UpperCamelCase		):
		__lowerCAmelCase      :						List[Any]						      =				parse(importlib.metadata.version(_UpperCamelCase		)		)
	return operation(_UpperCamelCase	,  parse(_UpperCamelCase		)		)
def    __lowerCAmelCase    (_UpperCamelCase	,  _UpperCamelCase		):
	return compare_versions(_UpperCamelCase	,  _UpperCamelCase	,  _UpperCamelCase		)

"""simple docstring"""







from __future__ import annotations
def    __lowerCAmelCase    (_UpperCamelCase		):
	__lowerCAmelCase      :						List[str]						      =				str(_UpperCamelCase		)
	return len(_UpperCamelCase		) == 9 and set(_UpperCamelCase		) == set('123456789'		)
def    __lowerCAmelCase    ():
	for base_num in range(9999	,  4999	,  -1		):
		__lowerCAmelCase      :						Union[str, Any]						      =				10_0002 * base_num
		if is_9_pandigital(_UpperCamelCase		):
			return candidate

	for base_num in range(333	,  99	,  -1		):
		__lowerCAmelCase      :						Dict						      =				100_2003 * base_num
		if is_9_pandigital(_UpperCamelCase		):
			return candidate

	return None


if __name__ == "__main__":
							print(f'{solution() = }')