function purges
    :param mq_queue_name: <string> name of the message queue
    :return: number of purged messages

def purge_mq_queue(mq_queue_name):
    """ function purges
    :param mq_queue_name: <string> name of the message queue
    :return: number of purged messages
    """
    conn = None
    chan = None
    try:
        conn = Connection()
        chan = conn.connection.channel()
        n = chan.queue_purge(mq_queue_name)
        sys.stdout.write('Purged {0} messages from {1} queue\n'.format(n, mq_queue_name))
        return n
    except Exception as e:
        sys.stderr.write('Unable to purge {0} due to {1}\n'.format(mq_queue_name, e))
    finally:
        if chan is not None:
            chan.close()
        if conn is not None:
            conn.close()