code: def image_undo():
      
      if len(image_undo_list) <= 0:
          print("no undos in memory")
          return
  
      [image, Z] = image_undo_list.pop(-1)
      image.set_array(Z)
      _pylab.draw()
docs: Undoes the last coarsen or smooth command.