human
Here's a good function header given the following:
I wrote the below code

    global descriptors, stats, vhost, username, password, urlstring, url_template, overview_url, compiled_results, STATS, vhosts, zero_rates_when_idle
    if (log is None):
        setup_logging('syslog', params['syslog_facility'], params['log_level'])
    log.info(('received    the    following    params:    %r' % params))
    if ('host' not in params):
        (params['host'], params['vhost'], params['username'], params['password'], params['port']) = ('localhost', '/', 'guest', 'guest', '15672')
    if ('zero_rates_when_idle' not in params):
        params['zero_rates_when_idle'] = 'false'
    vhosts = params['vhost'].split(',')
    (username, password) = (params['username'], params['password'])
    host = params['host']
    port = params['port']
    STATS = params['stats']
    if (type(STATS) is str):
        STATS = STATS.split(',')
    zero_rates_when_idle = str2bool(params['zero_rates_when_idle'])
    url = ('http://%s:%s/api/$stats/$vhost' % (host, port))
    overview_url = ('http://%s:%s/api/overview' % (host, port))
    base_url = ('http://%s:%s/api' % (host, port))
    password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm()
    password_mgr.add_password(None, base_url, username, password)
    handler = urllib2.HTTPBasicAuthHandler(password_mgr)
    opener = urllib2.build_opener(handler)
    opener.open(base_url)
    urllib2.install_opener(opener)
    url_template = Template(url)
    refreshStats(stats=STATS, vhosts=vhosts)
    def metric_handler(name):
        if (15 < (time.time() - metric_handler.timestamp)):
            metric_handler.timestamp = time.time()
            return refreshStats(stats=STATS, vhosts=vhosts)
    def create_desc(prop):
        d = {'name': 'XXX', 'call_back': getQueueStat, 'time_max': 60, 'value_type': 'uint', 'units': 'units', 'slope': 'both', 'format': '%d', 'description': 'XXX', 'groups': params['metric_group']}
        for (k, v) in prop.iteritems():
            d[k] = v
        return d
    def buildQueueDescriptors():
        for (vhost, metric) in product(vhosts,...

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

def metric_init(params):