code: def get_tsdata(mode="train"):
      df = get_ts_df()
      tsdata = TSDataset.from_pandas(
          df, dt_col="datetime", target_col="value"
      )
      stand = StandardScaler()
      tsdata.impute("last").scale(stand, fit=(mode == "train")).roll(
          lookback=48, horizon=12, time_enc=True, label_len=12
      )
      return tsdata
  
file_path: BigDL/python/chronos/test/bigdl/chronos/model/test_autoformer.py
imports: from unittest import TestCase
  from bigdl.chronos.utils import LazyImport
  from bigdl.chronos.data import TSDataset
  import pandas
  import numpy
  from sklearn.preprocessing import StandardScaler
  import tempfile
  import os
  from ..None import op_torch
label_desc: Use image node_id 2 for calling a global function with example usage: get_tsdata(mode) and returns: tsdata