First i tried to run your code just as .py script with following modifications and its working:
# was missing
import time
#plt.pause(2) # i commented this line, after pause plot not resuming any more
ani = FuncAnimation(fig, update, frames=consume, interval=20, save_count=N)
plt.show() # i added, without it animation not starting
But your question is about jupyter notebook, and here modifications to make it works:
import time
from IPython.display import HTML
#plt.pause(2) # i commented this line, after pause plot not resuming any more
ani = FuncAnimation(fig, update, frames=consume, interval=20, save_count=N)
HTML(ani.to_jshtml()) # i added, without it animation not starting