human
I wrote the below code

    columns = []
    doc = (data[0] or frappe.new_doc(df.options))
    def add_column(col_df):
        return (is_visible(col_df, doc) and column_has_value(data, col_df.get(u'fieldname')))
    if df.get(u'visible_columns'):
        for col_df in df.get(u'visible_columns'):
            docfield = table_meta.get_field(col_df.get(u'fieldname'))
            if (not docfield):
                continue
            newdf = docfield.as_dict().copy()
            newdf.update(col_df)
            if add_column(newdf):
                columns.append(newdf)
    else:
        for col_df in table_meta.fields:
            if add_column(col_df):
                columns.append(col_df)
    return columns

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def get_visible_columns(data, table_meta, df):