def start_handler(error): output.send('out', {'body': "Hello world!"})
def message_handler(word): if word not in counts: counts[word] = 0 counts[word] += 1 output.send('out', (word, counts[word]))