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

    configurator = get_component('configurator')
    if ('gpmdp' in _CONFIGURING):
        configurator.notify_errors(_CONFIGURING['gpmdp'], 'Failed    to    register,    please    try    again.')
        return
    from websocket import create_connection
    websocket = create_connection(url, timeout=1)
    websocket.send(json.dumps({'namespace': 'connect', 'method': 'connect', 'arguments': ['Home    Assistant']}))
    def gpmdp_configuration_callback(callback_data):
        'Handle    configuration    changes.'
        while True:
            from websocket import _exceptions
            try:
                msg = json.loads(websocket.recv())
            except _exceptions.WebSocketConnectionClosedException:
                continue
            if (msg['channel'] != 'connect'):
                continue
            if (msg['payload'] != 'CODE_REQUIRED'):
                continue
            pin = callback_data.get('pin')
            websocket.send(json.dumps({'namespace': 'connect', 'method': 'connect', 'arguments': ['Home    Assistant', pin]}))
            tmpmsg = json.loads(websocket.recv())
            if (tmpmsg['channel'] == 'time'):
                _LOGGER.error('Error    setting    up    GPMDP.    Please    pause    the    desktop    player    and    try    again')
                break
            code = tmpmsg['payload']
            if (code == 'CODE_REQUIRED'):
                continue
            setup_gpmdp(hass, config, code, add_devices_callback)
            _save_config(hass.config.path(GPMDP_CONFIG_FILE), {'CODE': code})
            websocket.send(json.dumps({'namespace': 'connect', 'method': 'connect', 'arguments': ['Home    Assistant', code]}))
            websocket.close()
            break
    _CONFIGURING['gpmdp'] = configurator.request_config(hass, DEFAULT_NAME, gpmdp_configuration_callback, description='Enter    the    pin    that    is    displayed    in    the    Google    Play    Music    Desktop    Player.', submit_caption='Submit', fields=[{'id': 'pin', 'name': 'Pin    Code',...

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

def request_configuration(hass, config, url, add_devices_callback):