human
I wrote the below code

    from gattlib import DiscoveryService
    new_devices = {}
    def see_device(address, name, new_device=False):
        'Mark    a    device    as    seen.'
        if new_device:
            if (address in new_devices):
                _LOGGER.debug('Seen    %s    %s    times', address, new_devices[address])
                new_devices[address] += 1
                if (new_devices[address] >= MIN_SEEN_NEW):
                    _LOGGER.debug('Adding    %s    to    tracked    devices', address)
                    devs_to_track.append(address)
                else:
                    return
            else:
                _LOGGER.debug('Seen    %s    for    the    first    time', address)
                new_devices[address] = 1
                return
        see(mac=(BLE_PREFIX + address), host_name=name.strip('\x00'))
    def discover_ble_devices():
        'Discover    Bluetooth    LE    devices.'
        _LOGGER.debug('Discovering    Bluetooth    LE    devices')
        try:
            service = DiscoveryService(ble_dev_id)
            devices = service.discover(duration)
            _LOGGER.debug('Bluetooth    LE    devices    discovered    =    %s', devices)
        except RuntimeError as error:
            _LOGGER.error('Error    during    Bluetooth    LE    scan:    %s', error)
            devices = []
        return devices
    yaml_path = hass.config.path(YAML_DEVICES)
    duration = config.get(CONF_SCAN_DURATION)
    ble_dev_id = config.get(CONF_BLUETOOTH_DEVICE)
    devs_to_track = []
    devs_donot_track = []
    for device in load_config(yaml_path, hass, 0):
        if (device.mac and (device.mac[:4].upper() == BLE_PREFIX)):
            if device.track:
                _LOGGER.debug('Adding    %s    to    BLE    tracker', device.mac)
                devs_to_track.append(device.mac[4:])
            else:
                _LOGGER.debug('Adding    %s    to    BLE    do    not    track', device.mac)
                devs_donot_track.append(device.mac[4:])
    track_new =...

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

def setup_scanner(hass, config, see, discovery_info=None):