def METHOD_NAME(elements):
    """Recursively convert elements to built-in types"""
    result = []
    for e in elements:
        if isinstance(e, ebml.MasterElement):
            result.append((e.id, e.type, e.name, e.level, e.position, e.size, METHOD_NAME(e.data)))
        else:
            result.append((e.id, e.type, e.name, e.level, e.position, e.size, None if isinstance(e.data, io.BytesIO) else e.data))
    return result