def METHOD_NAME(x):
    if isinstance(x, hl.Struct):
        return {k: METHOD_NAME(v) for k, v in x._fields.items()}
    elif isinstance(x, list):
        return [METHOD_NAME(elt) for elt in x]
    elif isinstance(x, tuple):
        return tuple([METHOD_NAME(elt) for elt in x])
    elif isinstance(x, dict):
        return {k: METHOD_NAME(v) for k, v in x.items()}
    else:
        return x