def convert(val: Node) -> Any:
    value = val._value()
    if (enum_to_str and isinstance(value, Enum)):
        value = f'{value.name}'
    return value
def convert(val: Node) -> Any:
    value = val._value()
    if (enum_to_str and isinstance(value, Enum)):
        value = f'{value.name}'
    return value