def METHOD_NAME(d):
    result = {}
    for k, v in d.items():
        if not isinstance(v, str):
            result[k] = v
            continue
        v = v.strip()
        if re.match(r"^[-+]?\d+$", v):
            result[k] = int(v)
        elif re.match(r"^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][-+]?\d+)?$", v):
            result[k] = float(v)
        elif v.lower() in ("false", "true"):
            result[k] = v.lower() == "true"
        elif v == "None":
            result[k] = None
        else:
            result[k] = v
    return result