def METHOD_NAME(layout):
    result = False
    def action_is_record(input, **kwargs):
        nonlocal result
        if input.is_record:
            result = True
            return input
        elif input.is_union:
            result = all(METHOD_NAME(x) for x in input.contents)
            return input
        else:
            return None
    ak._do.recursively_apply(layout, action_is_record, return_array=False)
    return result