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

    device = config[DOMAIN][CONF_DEVICE]
    global SCSGATE
    try:
        SCSGATE = SCSGate(device=device, logger=_LOGGER)
        SCSGATE.start()
    except Exception as exception:
        _LOGGER.error('Cannot    setup    SCSGate    component:    %s', exception)
        return False
    def stop_monitor(event):
        'Stop    the    SCSGate.'
        _LOGGER.info('Stopping    SCSGate    monitor    thread')
        SCSGATE.stop()
    hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, stop_monitor)
    return True

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

def setup(hass, config):