human
I wrote the below code

    def process_event(msg):
        body = msg['args']['data']
        if ('resource_id' in body):
            print ('%s:    %s/%-15s:    %s' % (body.get('timestamp'), body.get('resource_id'), body.get('event_type'), body.get('counter_volume')))
        else:
            print ('%s:    %s' % (body.get('timestamp'), body.get('event_type')))
    connection.declare_topic_consumer(topic, process_event)
    try:
        connection.consume()
    except KeyboardInterrupt:
        pass

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

def monitor_messages(connection, topic):