'Extract table-level keywords for DAOphot table.  These are indicated by
a leading \'#K \' prefix.'

def update_meta(self, lines, meta):

    table_meta = meta['table']
    Nlines = len(self.lines)
    if (Nlines > 0):
        get_line_id = (lambda s: s.split(None, 1)[0])
        (gid, groups) = zip(*groupmore(get_line_id, self.lines, range(Nlines)))
        (grouped_lines, gix) = zip(*groups)
        grouped_lines_dict = dict(zip(gid, grouped_lines))
        if ('#K' in grouped_lines_dict):
            keywords = OrderedDict(map(self.extract_keyword_line, grouped_lines_dict['#K']))
            table_meta['keywords'] = keywords
        coldef_dict = self.parse_col_defs(grouped_lines_dict)
        line_ids = ('#N', '#U', '#F')
        for (name, unit, fmt) in zip(*map(coldef_dict.get, line_ids)):
            meta['cols'][name] = {'unit': unit, 'format': fmt}
        self.meta = meta
        self.names = coldef_dict['#N']
