code: def test_partial_dependence(self):
      samples = [[0, 0, 2], [1, 0, 0]]
      labels = [0, 1]
  
      df = pdml.ModelFrame(samples, target=labels)
      gb1 = df.ensemble.GradientBoostingClassifier(
          random_state=self.random_state
      )
      df.fit(gb1)
      result = df.ensemble.partial_dependence.partial_dependence(
          gb1, [0], percentiles=(0, 1), grid_resolution=2
      )
  
      gb2 = ensemble.GradientBoostingClassifier(
          random_state=self.random_state
      )
      gb2.fit(samples, labels)
      expected = ensemble.partial_dependence.partial_dependence(
          gb2, [0], X=samples, percentiles=(0, 1), grid_resolution=2
      )
  
      self.assertEqual(len(result), 2)
      self.assert_numpy_array_almost_equal(result[0], expected[0])
      self.assert_numpy_array_almost_equal(result[1], expected[1])
  
file_path: pandas-ml/pandas_ml/skaccessors/test/test_ensemble.py
imports: import pytest
  import sklearn.datasets
  import sklearn.ensemble
  import sklearn.metrics
  import pandas_ml
  import pandas_ml.util.testing
label_desc: Use image node_id 4 for calling the TestEnsemble obj's underlying member method code with example usage: obj.test_partial_dependence() without return types