def METHOD_NAME(d) -> dict:
    converted = {}
    for key, value in d.items():
        if isinstance(value, dict):
            converted[key] = METHOD_NAME(value)
        elif isinstance(value, enum.Enum):
            converted[key] = value.value
        else:
            converted[key] = value
    return converted