code: def test_complete(fig_test, fig_ref):
      _generate_complete_test_figure(fig_ref)
      # plotting is done, now test its pickle-ability
      pkl = pickle.dumps(fig_ref, pickle.HIGHEST_PROTOCOL)
      # FigureCanvasAgg is picklable and GUI canvases are generally not, but there should
      # be no reference to the canvas in the pickle stream in either case.  In order to
      # keep the test independent of GUI toolkits, run it with Agg and check that there's
      # no reference to FigureCanvasAgg in the pickle stream.
      assert "FigureCanvasAgg" not in [
          arg for op, arg, pos in pickletools.genops(pkl)
      ]
      loaded = pickle.loads(pkl)
      loaded.canvas.draw()
  
      fig_test.set_size_inches(loaded.get_size_inches())
      fig_test.figimage(loaded.canvas.renderer.buffer_rgba())
  
      plt.close(loaded)
  
imports: from io import BytesIO
  import ast
  import pickle
  import pickletools
  import numpy
  import pytest
  import matplotlib
  from matplotlib import cm
  from matplotlib.testing import subprocess_run_helper
  from matplotlib.testing.decorators import check_figures_equal
  from matplotlib.dates import rrulewrapper
  from matplotlib.lines import VertexSelector
  import matplotlib.pyplot
  import matplotlib.transforms
  import matplotlib.figure
  from mpl_toolkits.axes_grid1 import parasite_axes
label_desc: Use image node_id 3 for calling a global function with example usage: test_complete(fig_test, fig_ref) without return types