human
I wrote the below code

    def _shutdown(call):
        'Stop    the    metadatastream    on    shutdown.'
        for (serialnumber, device) in AXIS_DEVICES.items():
            _LOGGER.info('Stopping    metadatastream    for    %s.', serialnumber)
            device.stop_metadatastream()
    hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, _shutdown)
    def axis_device_discovered(service, discovery_info):
        'Called    when    axis    devices    has    been    found.'
        host = discovery_info[CONF_HOST]
        name = discovery_info['hostname']
        serialnumber = discovery_info['properties']['macaddress']
        if (serialnumber not in AXIS_DEVICES):
            config_file = _read_config(hass)
            if (serialnumber in config_file):
                try:
                    config = DEVICE_SCHEMA(config_file[serialnumber])
                    config[CONF_HOST] = host
                except vol.Invalid as err:
                    _LOGGER.error('Bad    data    from    %s.    %s', CONFIG_FILE, err)
                    return False
                if (not setup_device(hass, config)):
                    _LOGGER.error("Couldn't    set    up    %s", config[CONF_NAME])
            else:
                request_configuration(hass, name, host, serialnumber)
        else:
            device = AXIS_DEVICES[serialnumber]
            device.url = host
            async_dispatcher_send(hass, (((DOMAIN + '_') + device.name) + '_new_ip'), host)
    discovery.listen(hass, SERVICE_AXIS, axis_device_discovered)
    if (DOMAIN in base_config):
        for device in base_config[DOMAIN]:
            config = base_config[DOMAIN][device]
            if (CONF_NAME not in config):
                config[CONF_NAME] = device
            if (not setup_device(hass, config)):
                _LOGGER.error("Couldn't    set    up    %s", config[CONF_NAME])
    descriptions = load_yaml_config_file(os.path.join(os.path.dirname(__file__), 'services.yaml'))
    def vapix_service(call):
        'Service    to    send    a    message.'
        for...

What's a good function header?

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

def setup(hass, base_config):