from typing import Any


def numpy_to_python_type(value: Any):
    """
    Convert numpy dtype variable to Python type, if possible.
    """
    try:
        return value.item()
    except AttributeError:
        return value