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

    from pycomfoconnect import Bridge
    conf = config[DOMAIN]
    host = conf.get(CONF_HOST)
    name = conf.get(CONF_NAME)
    token = conf.get(CONF_TOKEN)
    user_agent = conf.get(CONF_USER_AGENT)
    pin = conf.get(CONF_PIN)
    bridges = Bridge.discover(host)
    if (not bridges):
        _LOGGER.error('Could    not    connect    to    ComfoConnect    bridge    on    %s', host)
        return False
    bridge = bridges[0]
    _LOGGER.info('Bridge    found:    %s    (%s)', bridge.uuid.hex(), bridge.host)
    ccb = ComfoConnectBridge(hass, bridge, name, token, user_agent, pin)
    hass.data[DOMAIN] = ccb
    ccb.connect()
    def _shutdown(_event):
        ccb.disconnect()
    hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, _shutdown)
    discovery.load_platform(hass, 'fan', DOMAIN, {}, config)
    return True

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

def setup(hass, config):