code: def _assert_pyplot_was_produced(
      cols_to_test, model, train, target=None
  ):
      for col in cols_to_test:
          if target is None:
              ice_plot_result = model.ice_plot(
                  train, col, output_graphing_data=True
              )
          else:
              ice_plot_result = model.ice_plot(
                  train, col, target=target, output_graphing_data=True
              )
          assert isinstance(
              ice_plot_result.figure(), matplotlib.pyplot.Figure
          )
          assert isinstance(ice_plot_result, 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 4 for calling a global function with example usage: _assert_pyplot_was_produced(cols_to_test, model, train, target) without return types