code: def test_tslime(self):
      # load model
      input_length = 24
      forecast_horizon = 4
      forecaster = RandomForestUniVariateForecaster(
          n_past=input_length, n_future=forecast_horizon
      )
  
      forecaster.fit(self.ts_train.iloc[-200:])
  
      # initialize/fit explainer
  
      relevant_history = 12
      explainer = TSLimeExplainer(
          model=forecaster.predict,
          input_length=input_length,
          relevant_history=relevant_history,
          perturbers=[
              BlockBootstrapPerturber(
                  window_length=min(4, input_length - 1),
                  block_length=2,
                  block_swap=2,
              ),
          ],
          n_perturbations=10,
          random_seed=22,
      )
  
      # compute explanations
      test_window = self.ts_test.iloc[:input_length]
      explanation = explainer.explain_instance(
          ts=test_window,
      )
  
      # validate explanation structure
      self.assertIn("input_data", explanation)
      self.assertIn("history_weights", explanation)
      self.assertIn("x_perturbations", explanation)
      self.assertIn("y_perturbations", explanation)
      self.assertIn("model_prediction", explanation)
      self.assertIn("surrogate_prediction", explanation)
  
      self.assertEqual(
          explanation["history_weights"].shape[0], relevant_history
      )
  
file_path: AIX360/tests/tslime/test_tslime.py
imports: import os
  import unittest
  import numpy
  import pandas
  from sklearn.model_selection import train_test_split
  from sklearn.ensemble import RandomForestRegressor
  from aix360.algorithms.tsutils.tsframe import tsFrame
  from aix360.datasets import SunspotDataset
  from aix360.algorithms.tslime import TSLimeExplainer
  from aix360.algorithms.tsutils.tsperturbers import BlockBootstrapPerturber
label_desc: Use image node_id 2 for calling the TestTSLimeExplainer obj's underlying member method code with example usage: obj.test_tslime() without return types