human
I wrote the below code

    if (not _pianobar_exists()):
        return False
    pandora = PandoraMediaPlayer('Pandora')
    def _stop_pianobar(_event):
        pandora.turn_off()
    hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, _stop_pianobar)
    add_devices([pandora])

What's a good function header?

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

def setup_platform(hass, config, add_devices, discovery_info=None):