human
I wrote the below code

    global VERA_CONTROLLER
    import pyvera as veraApi
    def stop_subscription(event):
        'Shutdown    Vera    subscriptions    and    subscription    thread    on    exit.'
        _LOGGER.info('Shutting    down    subscriptions')
        VERA_CONTROLLER.stop()
    config = base_config.get(DOMAIN)
    base_url = config.get(CONF_CONTROLLER)
    light_ids = config.get(CONF_LIGHTS)
    exclude_ids = config.get(CONF_EXCLUDE)
    (VERA_CONTROLLER, _) = veraApi.init_controller(base_url)
    hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, stop_subscription)
    try:
        all_devices = VERA_CONTROLLER.get_devices()
    except RequestException:
        _LOGGER.exception('Error    communicating    with    Vera    API')
        return False
    devices = [device for device in all_devices if (device.device_id not in exclude_ids)]
    for device in devices:
        device_type = map_vera_device(device, light_ids)
        if (device_type is None):
            continue
        VERA_DEVICES[device_type].append(device)
    for component in VERA_COMPONENTS:
        discovery.load_platform(hass, component, DOMAIN, {}, base_config)
    return True

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

def setup(hass, base_config):