from typing import Any


def str_to_python(value: str) -> Any:
    """
    Convert a node value (string) into python native equivalent
    :param value: incoming variable string
    :returns: value as a native Python data type
    :rtype: Any
    """

    try:
        if "." in value:
            # assume to be float
            ret = float(value)
        elif len(value) > 1 and value.startswith("0"):
            # Don't convert to int if it has a leading zero
            # We want to keep the zero, converting to int would remove it
            ret = value
        else:
            # try to convert to int
            ret = int(value)
    except ValueError:
        # conversion did not succeed, leave it as a string.
        ret = value
    return ret