code: def test_set_current_figure_via_subfigure():
      fig1 = plt.figure()
      subfigs = fig1.subfigures(2)
  
      plt.figure()
      assert plt.gcf() != fig1
  
      current = plt.figure(subfigs[1])
      assert plt.gcf() == fig1
      assert current == fig1
  
imports: import difflib
  import numpy
  import sys
  from pathlib import Path
  import pytest
  import matplotlib
  from matplotlib.testing import subprocess_run_for_testing
  from matplotlib import pyplot
label_desc: Use image node_id 20 for calling a global function with example usage: test_set_current_figure_via_subfigure() without return types