code: def test_zero_importance():
      """Test whether the explainer attributes a zero importance to each feature for a constant predictor."""
      explainer = PartialDependenceVariance(
          predictor=lambda x: np.full((len(x),), fill_value=1)
      )
      exp = explainer.explain(
          X=np.random.rand(100, 10), method="importance"
      )
      assert np.allclose(exp.data["feature_importance"], 0)
  
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 6 for calling a global function with example usage: test_zero_importance() without return types