def METHOD_NAME(filename, memory):
    print(memory)
    numSamples = len(memory["aos_c"])
    f = open(filename, "wt")
    M = MeshNames()
    f.write("event," + string.replace(str(M), "'", "")[1:-1] + "\n")
    for row in range(numSamples):
        s = memory["aos_c"][row][1] 
        for m in M:
            s = s + ", " + str(memory[m][row][0])
        f.write(s + "\n")
    f.close()