I want to overload the function below so if passed a value that supports int() Python type hints int otherwise Python type hints the value passed.
Python typing module provides a SupportsInt type we can use to check if our value supports int.
from typing import Any, SupportsInt, overload@overloaddef to_int(value: SupportsInt) -> int: ...@overloaddef to_int[T: NotSupportsInt???](value: T) -> T: ...def to_int(value: Any) -> Any: try: return int(value) except TypeError: return valueBut in our second overload statement how can we specify all values that don't support int?