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

    global DEVICE
    global GPIO_DIGITAL_OUTPUT_LOW
    global GPIO_DIGITAL_OUTPUT_HIGH
    global ADC_PERCENTAGE
    global DIGITAL_PINS
    global ANALOG_PINS
    global CONVERT_ADC
    global ZIGBEE_EXCEPTION
    global ZIGBEE_TX_FAILURE
    import xbee_helper.const as xb_const
    from xbee_helper import ZigBee
    from xbee_helper.device import convert_adc
    from xbee_helper.exceptions import ZigBeeException, ZigBeeTxFailure
    from serial import Serial, SerialException
    GPIO_DIGITAL_OUTPUT_LOW = xb_const.GPIO_DIGITAL_OUTPUT_LOW
    GPIO_DIGITAL_OUTPUT_HIGH = xb_const.GPIO_DIGITAL_OUTPUT_HIGH
    ADC_PERCENTAGE = xb_const.ADC_PERCENTAGE
    DIGITAL_PINS = xb_const.DIGITAL_PINS
    ANALOG_PINS = xb_const.ANALOG_PINS
    CONVERT_ADC = convert_adc
    ZIGBEE_EXCEPTION = ZigBeeException
    ZIGBEE_TX_FAILURE = ZigBeeTxFailure
    usb_device = config[DOMAIN].get(CONF_DEVICE, DEFAULT_DEVICE)
    baud = int(config[DOMAIN].get(CONF_BAUD, DEFAULT_BAUD))
    try:
        ser = Serial(usb_device, baud)
    except SerialException as exc:
        _LOGGER.exception('Unable    to    open    serial    port    for    ZigBee:    %s', exc)
        return False
    DEVICE = ZigBee(ser)
    hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, close_serial_port)
    def _frame_received(frame):
        'Run    when    a    ZigBee    frame    is    received.\n\n                                Pickles    the    frame,    then    encodes    it    into    base64    since    it    contains\n                                non    JSON    serializable    binary.\n                                '
        dispatcher_send(hass, SIGNAL_ZIGBEE_FRAME_RECEIVED, frame)
    DEVICE.add_frame_rx_handler(_frame_received)
    return True

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

def setup(hass, config):