'Helper function to generate a 2-column table row
for the PDF header
@param left: the column name for the left column
@param right: the column name for the right column,
or None for an empty column
@param row: the S3ResourceData row
@param labels: dict of labels {colname: label}'

@staticmethod
def _header_row(left, right, row=None, labels=None):

    from gluon import TD, TH, TR
    if right:
        header_row = TR(TH(labels[left]), TD(row[left]), TH(labels[right]), TD(row[right]))
    else:
        header_row = TR(TH(labels[left]), TD(row[left], _colspan=3))
    return header_row
