code: def _assert_list_of_plots_was_produced(
      cols_to_test, model, train, target, grouping_variable
  ):
      for col in cols_to_test:
          if target is None:
              ice_plot_result = model.ice_plot(
                  train,
                  col,
                  grouping_column=grouping_variable,
                  output_graphing_data=True,
              )
          else:
              ice_plot_result = model.ice_plot(
                  train,
                  col,
                  target="setosa",
                  grouping_column=grouping_variable,
                  output_graphing_data=True,
              )
          assert isinstance(ice_plot_result, list)
          assert isinstance(
              ice_plot_result[0].figure(), matplotlib.pyplot.Figure
          )
          assert isinstance(ice_plot_result[0], H2OTwoDimTable)
  
      matplotlib.pyplot.close("all")
  
imports: import sys
  import os
  import matplotlib
  import h2o
  import math
  import matplotlib.pyplot
  from tests import pyunit_utils
  from h2o.estimators import *
  from h2o.explanation._explain import *
  from h2o.explanation._explain import _handle_orig_values, _factor_mapper
  from h2o.two_dim_table import H2OTwoDimTable
label_desc: Use image node_id 8 for calling a global function with example usage: _assert_list_of_plots_was_produced(cols_to_test, model, train, target, grouping_variable) without return types