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

    from zeroconf import Zeroconf, ServiceInfo
    zeroconf = Zeroconf()
    zeroconf_name = '{}.{}'.format(hass.config.location_name, ZEROCONF_TYPE)
    requires_api_password = (hass.config.api.api_password is not None)
    params = {'version': __version__, 'base_url': hass.config.api.base_url, 'requires_api_password': requires_api_password}
    host_ip = util.get_local_ip()
    try:
        host_ip_pton = socket.inet_pton(socket.AF_INET, host_ip)
    except socket.error:
        host_ip_pton = socket.inet_pton(socket.AF_INET6, host_ip)
    info = ServiceInfo(ZEROCONF_TYPE, zeroconf_name, host_ip_pton, hass.http.server_port, 0, 0, params)
    zeroconf.register_service(info)
    def stop_zeroconf(event):
        'Stop    Zeroconf.'
        zeroconf.unregister_service(info)
        zeroconf.close()
    hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, stop_zeroconf)
    return True

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

def setup(hass, config):