code: def test_grouped_plot_fignums(self):
      n = 10
      weight = Series(np.random.default_rng(2).normal(166, 20, size=n))
      height = Series(np.random.default_rng(2).normal(60, 10, size=n))
      gender = np.random.default_rng(2).choice(
          ["male", "female"], size=n
      )
      df = DataFrame(
          {"height": height, "weight": weight, "gender": gender}
      )
      gb = df.groupby("gender")
  
      res = gb.plot()
      assert len(mpl.pyplot.get_fignums()) == 2
      assert len(res) == 2
      plt.close("all")
  
      res = gb.boxplot(return_type="axes")
      assert len(mpl.pyplot.get_fignums()) == 1
      assert len(res) == 2
  
imports: import itertools
  import string
  import numpy
  import pytest
  from pandas import DataFrame, MultiIndex, Series, date_range, plotting, timedelta_range
  import pandas._testing
  from pandas.tests.plotting.common import _check_axes_shape, _check_box_return_type, _check_plot_works, _check_ticks_props, _check_visible
  from pandas.io.formats.printing import pprint_thing
label_desc: Use image node_id 6 for calling the TestDataFrameGroupByPlots obj's underlying member method code with example usage: obj.test_grouped_plot_fignums() without return types