def debug_dump(message, file_prefix="dump"):
    """
    Utility while developing to dump message data to play with in the
    interpreter
    """

    global index
    index += 1

    with open("%s_%s.dump" % (file_prefix, index), 'w') as f:
        f.write(message.SerializeToString())
        f.close()
Utility while developing to dump message data to play with in the
    interpreter