code: def create_movie(fig, update_figure, filename, title, fps=15, dpi=100):
      
      FFMpegWriter = manimation.writers['ffmpeg']
      metadata     = dict(title=title)
      writer       = FFMpegWriter(fps=fps, metadata=metadata)
  
      with writer.saving(fig, filename, dpi):
          t = 0
          while True:
              if update_figure(t):
                  writer.grab_frame()
                  t += 1
              else:
                  break
docs: Helps us to create a movie.