human
I wrote the below code

    if (vars is None):
        vars = {}
    db_cursor = ctx.db.cursor()
    if (not processed):
        (sql_query, vars) = reparam(sql_query, vars)
    ctx.db_execute(db_cursor, sql_query, vars)
    if db_cursor.description:
        names = [x[0] for x in db_cursor.description]
        def iterwrapper():
            row = db_cursor.fetchone()
            while row:
                (yield Storage(dict(zip(names, row))))
                row = db_cursor.fetchone()
        out = iterbetter(iterwrapper())
        out.__len__ = (lambda : int(db_cursor.rowcount))
        out.list = (lambda : [Storage(dict(zip(names, x))) for x in db_cursor.fetchall()])
    else:
        out = db_cursor.rowcount
    if (not ctx.db_transaction):
        ctx.db.commit()
    return out

What's a good function header?

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

def query(sql_query, vars=None, processed=False):