<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def query_columns(conn, query, name=None):
 """Lightweight query to retrieve column list of select query. Notes ----- Strongly urged to specify a cursor name for performance. """


    with conn.cursor(name) as cursor:
        cursor.itersize = 1
        cursor.execute(query)
        cursor.fetchmany(0)
        column_names = [column.name for column in cursor.description]

    return column_names