code: def test_agent_visualizer_save_frame(self):
      parameter_dict = LinePlotter._defaults.copy()
      parameter_dict["get_line_data_fn"] = lambda: [[1, 2, 3]]
      plotter = LinePlotter(parameter_dict=parameter_dict)
  
      agent_visualizer = AgentVisualizer(self._test_subdir, [plotter])
      agent_visualizer.save_frame()
  
      frame_filename = os.path.join(
          self._test_subdir, "frame_000000.png"
      )
      self.assertTrue(tf.io.gfile.exists(frame_filename))
  
      im = Image.open(frame_filename)
      im_arr = np.array(im)
      self.assertTrue(
          np.array_equal(im_arr, agent_visualizer.record_frame)
      )
  
file_path: dopamine/tests/dopamine/utils/agent_visualizer_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import shutil
  from absl import flags
  from dopamine.utils.agent_visualizer import AgentVisualizer
  from dopamine.utils.line_plotter import LinePlotter
  import numpy
  from PIL import Image
  import tensorflow
label_desc: Use image node_id 2 for calling the AgentVisualizerTest obj's underlying member method code with example usage: obj.test_agent_visualizer_save_frame() without return types