human
I wrote the below code

    def process_event(body):
        print ('%s:    %s' % (body.get('timestamp'), body.get('event_type', 'unknown    event')))
        pickle.dump(body, output)
    connection.declare_topic_consumer(topic, process_event)
    try:
        connection.consume()
    except KeyboardInterrupt:
        pass

What's a good function header?
assistant
#Here is Python program to print ('%s:    %s' % (body.

def record_messages(connection, topic, output):