human
I wrote the below code

    import pifacedigitalio as PFIO
    pifacedigital = PFIO.PiFaceDigital()
    hass.data[DATA_PFIO_LISTENER] = PFIO.InputEventListener(chip=pifacedigital)
    def cleanup_pfio(event):
        'Stuff    to    do    before    stopping.'
        PFIO.deinit()
    def prepare_pfio(event):
        'Stuff    to    do    when    home    assistant    starts.'
        hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, cleanup_pfio)
    hass.bus.listen_once(EVENT_HOMEASSISTANT_START, prepare_pfio)
    PFIO.init()
    return True

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

def setup(hass, config):