def METHOD_NAME(rewData, fname):
    cumRewards = np.cumsum(rewData)
    tsteps = np.array(range(len(cumRewards)))
    # Plotting time!
    plt.figure()
    plt.plot(tsteps, cumRewards)
    plt.xlabel("Timesteps")
    plt.ylabel("Cumulative Reward")
    plt.title("Cumulative Reward by Iteration")
    plt.savefig(fname[0:-4] + ".png", dpi=200)
    plt.pause(0.001)  # Pause so that that GUI can do its thing.