class_docstr: Helper to grab a series of screenshots from the current Canvas-like object.
code: def __init__(self, canvas_obj, frame_grab_list: list[int]):
      self._canvas = canvas_obj
      self._done = False
      self._current_frame = -1
      self._collected_images = []
      self._frames_to_grab = frame_grab_list[:]
  
imports: from __future__ import annotations
  import os
  import time
  import shutil
  from vispy.io import imsave
  from vispy.gloo.util import _screenshot
  from vispy.scene import SceneCanvas
  from sphinx_gallery.scrapers import optipng, figure_rst
label_desc: Use image node_id 1 to create a new FrameGrabber object  with example: obj = FrameGrabber(canvas_obj, frame_grab_list)