'Render the header row with field labels
@param data: the input field data as Python object
@param readonly: whether the form is read-only
@param attributes: HTML attributes for the header row'

def headers(self, data, readonly=False):

    fields = data['fields']
    render_header = False
    header_row = DIV(_class='label-row    row')
    happend = header_row.append
    numfields = len(fields)
    columns = self.columns
    for (i, f) in enumerate(fields):
        label = f['label']
        if label:
            render_header = True
        if (columns and (len(columns) > i)):
            width = columns[i]
        else:
            width = 1
        column_class = ('small-%s    columns' % width)
        if (i == (len(fields) - 1)):
            column_class = ('%s    end' % column_class)
        label = DIV(LABEL(label), _class=column_class)
        happend(label)
    if render_header:
        return DIV(header_row)
    else:
        return None
