code: def test_shapley_with_static_cov(self):
      ts = self.target_ts_with_static_covs
      model_cls = LightGBMModel if lgbm_available else XGBModel
      model = model_cls(
          lags=4,
          output_chunk_length=1,
      )
      model.fit(
          series=ts,
      )
      shap_explain = ShapExplainer(model)
  
      # different static covariates dimensions should raise an error
      with pytest.raises(ValueError):
          shap_explain.explain(
              ts.with_static_covariates(ts.static_covariates["state"])
          )
  
      # without static covariates should raise an error
      with pytest.raises(ValueError):
          shap_explain.explain(ts.with_static_covariates(None))
  
      explanation_results = shap_explain.explain(ts)
      assert len(
          explanation_results.explained_forecasts[1]["price"].columns
      ) == (
          -(min(model.lags["target"]))
          + model.static_covariates.shape[1]
      )
  
      model.fit(
          series=self.target_ts_with_multi_component_static_covs,
      )
      shap_explain = ShapExplainer(model)
      explanation_results = shap_explain.explain()
      assert len(explanation_results.feature_values[1]) == 2
      for (
          comp
      ) in self.target_ts_with_multi_component_static_covs.components:
          comps_out = explanation_results.explained_forecasts[1][
              comp
          ].columns
          assert len(comps_out) == (
              -(min(model.lags["target"])) * model.input_dim["target"]
              + model.input_dim["target"]
              * model.static_covariates.shape[1]
          )
          assert comps_out[-4:].tolist() == [
              "type_statcov_target_price",
              "type_statcov_target_power",
              "state_statcov_target_price",
              "state_statcov_target_power",
          ]
  
imports: import copy
  from datetime import date, timedelta
  import matplotlib.pyplot
  import numpy
  import pandas
  import pytest
  import shap
  import sklearn
  from dateutil.relativedelta import relativedelta
  from numpy.testing import assert_array_equal
  from sklearn.preprocessing import MinMaxScaler
  from darts import TimeSeries
  from darts.dataprocessing.transformers import Scaler
  from darts.explainability.explainability_result import ShapExplainabilityResult
  from darts.explainability.shap_explainer import MIN_BACKGROUND_SAMPLE, ShapExplainer
  from darts.models import CatBoostModel, ExponentialSmoothing, LightGBMModel, LinearRegressionModel, NotImportedModule, RegressionModel, XGBModel
  from darts.utils.timeseries_generation import linear_timeseries
label_desc: Use image node_id 11 for calling the TestShapExplainer obj's underlying member method code with example usage: obj.test_shapley_with_static_cov() without return types