human
I wrote the below code

    (print_start, print_status, print_done) = _get_verbose_prints(verbose)
    languages = dict(((l.id, l) for l in session.query(pokedex.db.tables.Language)))
    if (not directory):
        directory = get_default_csv_dir()
    table_names = _get_table_names(metadata, tables)
    table_names.sort()
    oracle = (session.connection().dialect.name == 'oracle')
    if oracle:
        rewrite_long_table_names()
    for table_name in table_names:
        print_start(table_name)
        table = metadata.tables[table_name]
        if oracle:
            filename = ('%s/%s.csv' % (directory, table._original_name))
        else:
            filename = ('%s/%s.csv' % (directory, table_name))
        if six.PY3:
            writer = csv.writer(open(filename, 'w', newline=''), lineterminator='\n')
            columns = [col.name for col in table.columns]
        else:
            writer = csv.writer(open(filename, 'wb'), lineterminator='\n')
            columns = [col.name.encode('utf8') for col in table.columns]
        if ('local_language_id' in columns):
            if (langs is None):
                def include_row(row):
                    return languages[row.local_language_id].official
            elif any((col.info.get('official') for col in table.columns)):
                def include_row(row):
                    return (languages[row.local_language_id].official or (languages[row.local_language_id].identifier in langs))
            else:
                def include_row(row):
                    return (languages[row.local_language_id].identifier in langs)
        else:
            def include_row(row):
                return True
        writer.writerow(columns)
        primary_key = table.primary_key
        for row in session.query(table).order_by(*primary_key).all():
            if include_row(row):
                csvs = []
                for col in columns:
                    val = getattr(row, col)
                    if (val == None):
                        val = ''
                    elif (val ==...

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

def dump(session, tables=[], directory=None, verbose=False, langs=None):