code: def test_tree_pd(predictor, iris_data):
      """Tests whether the `pd_explainer` initialized within the
      `PartialDependenceVariance` explainer is of type `TreePartialDependence`.
      """
      predictor = predictor.fit(
          iris_data["X_train"], iris_data["y_train"]
      )
      explainer = PartialDependenceVariance(predictor=predictor)
      assert isinstance(explainer.pd_explainer, TreePartialDependence)
  
imports: import re
  from copy import deepcopy
  import matplotlib.pyplot
  import numpy
  import pandas
  import pytest
  from pytest_lazyfixture import lazy_fixture
  from sklearn.ensemble import GradientBoostingRegressor
  from sklearn.linear_model import LinearRegression
  from alibi.api.defaults import DEFAULT_DATA_PDVARIANCE, DEFAULT_META_PDVARIANCE
  from alibi.api.interfaces import Explanation
  from alibi.explainers import PartialDependence, PartialDependenceVariance, TreePartialDependence
  from alibi.explainers.pd_variance import _plot_feature_importance, _plot_feature_interaction, _plot_hbar, plot_pd_variance
label_desc: Use image node_id 2 for calling a global function with example usage: test_tree_pd(predictor, iris_data) without return types