code: def test_shap_selected_components(self):
      model_cls = LightGBMModel if lgbm_available else XGBModel
      model = model_cls(
          lags=4,
          lags_past_covariates=2,
          lags_future_covariates=[1],
          output_chunk_length=1,
      )
      model.fit(
          series=self.target_ts,
          past_covariates=self.past_cov_ts,
          future_covariates=self.fut_cov_ts,
      )
      shap_explain = ShapExplainer(model)
      explanation_results = shap_explain.explain()
      # check that explain() with selected components gives identical results
      for comp in self.target_ts.components:
          explanation_comp = shap_explain.explain(
              target_components=[comp]
          )
          assert explanation_comp.available_components == [comp]
          assert explanation_comp.available_horizons == [1]
          # explained forecasts
          fc_res_tmp = copy.deepcopy(
              explanation_results.explained_forecasts
          )
          fc_res_tmp[1] = {str(comp): fc_res_tmp[1][comp]}
          assert explanation_comp.explained_forecasts == fc_res_tmp
  
          # feature values
          fv_res_tmp = copy.deepcopy(explanation_results.feature_values)
          fv_res_tmp[1] = {str(comp): fv_res_tmp[1][comp]}
          assert explanation_comp.explained_forecasts == fc_res_tmp
  
          # shap objects
          assert (
              len(explanation_comp.shap_explanation_object[1]) == 1
              and comp in explanation_comp.shap_explanation_object[1]
          )
  
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 10 for calling the TestShapExplainer obj's underlying member method code with example usage: obj.test_shap_selected_components() without return types