code: def _save_image(image, filename, return_img=None):
          
          if not image.size:
              raise Exception('Empty image.  Have you run plot() first?')
  
          # write screenshot to file
          if isinstance(filename, str):
              if isinstance(vtki.FIGURE_PATH, str) and not os.path.isabs(filename):
                  filename = os.path.join(vtki.FIGURE_PATH, filename)
              if not return_img:
                  return imageio.imwrite(filename, image)
              imageio.imwrite(filename, image)
  
          return image
docs: Internal helper for saving a NumPy image array