def METHOD_NAME(e, path):
    if not isinstance(e, list):
        raise ValidationError(path, "must be an array")
    if not e:
        raise ValidationError(path, "must not be empty")
    for i in range(0, len(e)):
        elem = e[i]
        p = "%s[%s]" % (path, i)
        if 'type' not in elem:
            raise ValidationError(p, "does not contain a 'type'")
        t = elem['type']
        if t == 'h1' or t == 'h2' or t == 'h3' or t == 'h4' or t == 'h5':
            parse_heading(elem, p)
        elif t == 'hline':
            parse_hline(elem, p)
        elif t == 'paragraph':
            parse_paragraph(elem, p)
        elif t == 'text':
            parse_text(elem, p)
        elif t == 'ordered_list':
            parse_ordered_list(elem, p)
        elif t == 'unordered_list':
            parse_unordered_list(elem, p)
        elif t == 'group':
            parse_group(elem, p)
        elif t == 'pie':
            parse_pie(elem, p)
        elif t == 'grid':
            parse_grid(elem, p)
        elif t == 'table':
            parse_table(elem, p)
        elif t == 'icon':
            parse_icon(elem, p)
        else:
            raise ValidationError(p, "type '%s' not supported" % t)