code: def _series_to_supervised(self, data, n_in=1, n_out=1, dropnan=True):
      n_vars = 1 if type(data) is list else data.shape[1]
      df = pd.DataFrame(data)
      cols = list()
  
      # input sequence (t-n, ... t-1)
      for i in range(n_in, 0, -1):
          cols.append(df.shift(i))
      # forecast sequence (t, t+1, ... t+n)
      for i in range(0, n_out):
          cols.append(df.shift(-i))
      # put it all together
      agg = pd.concat(cols, axis=1)
      # drop rows with NaN values
      if dropnan:
          agg.dropna(inplace=True)
      return agg.values
  
file_path: AIX360/tests/tssaliency/test_tssaliency.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.tssaliency import TSSaliencyExplainer
label_desc: Use image node_id 3 for calling the RandomForestUniVariateForecaster obj's underlying member method code with example usage: obj._series_to_supervised(data, n_in, n_out, dropnan) and returns: agg