human
I wrote the below code

    from pylons import app_globals as g
    from r2.models import Link, Subreddit, Account
    from r2.lib.db.operators import desc
    from r2.lib.comment_tree import comments_key, messages_key
    from r2.lib.utils import fetch_things2, in_chunks
    from r2.lib.utils import last_modified_key
    from r2.lib.promote import promoted_memo_key
    from r2.lib.subreddit_search import load_all_reddits
    from r2.lib.db import queries
    from r2.lib.cache import CassandraCacheChain
    authority = g.permacache.caches[(-1)]
    nonauthority = CassandraCacheChain(g.permacache.caches[1:(-1)])
    def populate(keys):
        vals = authority.simple_get_multi(keys)
        if vals:
            nonauthority.set_multi(vals)
    def gen_keys():
        (yield promoted_memo_key)
        load_all_reddits()
        (yield queries.get_all_comments().iden)
        l_q = Link._query((Link.c._spam == (True, False)), (Link.c._deleted == (True, False)), sort=desc('_date'), data=True)
        for link in fetch_things2(l_q, verbosity):
            (yield comments_key(link._id))
            (yield last_modified_key(link, 'comments'))
        a_q = Account._query((Account.c._spam == (True, False)), sort=desc('_date'))
        for account in fetch_things2(a_q, verbosity):
            (yield messages_key(account._id))
            (yield last_modified_key(account, 'overview'))
            (yield last_modified_key(account, 'commented'))
            (yield last_modified_key(account, 'submitted'))
            (yield last_modified_key(account, 'liked'))
            (yield last_modified_key(account, 'disliked'))
            (yield queries.get_comments(account, 'new', 'all').iden)
            (yield queries.get_submitted(account, 'new', 'all').iden)
            (yield queries.get_liked(account).iden)
            (yield queries.get_disliked(account).iden)
            (yield queries.get_hidden(account).iden)
            (yield queries.get_saved(account).iden)
            (yield queries.get_inbox_messages(account).iden)
            (yield...

What's a good function header?

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

def pushup_permacache(verbosity=1000):