code: def test_tsdataset_split(self):
      df = get_ts_df()
      # only train and test
      tsdata_train, tsdata_valid, tsdata_test = TSDataset.from_pandas(
          df,
          dt_col="datetime",
          target_col="value",
          extra_feature_col=["extra feature"],
          id_col="id",
          with_split=True,
          val_ratio=0,
          test_ratio=0.1,
      )
      # standard split with all three sets
      tsdata_train, tsdata_valid, tsdata_test = TSDataset.from_pandas(
          df,
          dt_col="datetime",
          target_col="value",
          extra_feature_col=["extra feature"],
          id_col="id",
          with_split=True,
          val_ratio=0.1,
          test_ratio=0.1,
          largest_look_back=5,
          largest_horizon=2,
      )
  
      assert set(np.unique(tsdata_train.to_pandas()["id"])) == {"00"}
      assert set(np.unique(tsdata_valid.to_pandas()["id"])) == {"00"}
      assert set(np.unique(tsdata_test.to_pandas()["id"])) == {"00"}
  
      assert (
          len(tsdata_train.to_pandas())
          == df[: -(int(df.shape[0] * 0.1) * 2)].shape[0]
      )
      assert len(tsdata_valid.to_pandas()) == int(
          df.shape[0] * 0.1 + 5 + 2 - 1
      )
      assert len(tsdata_test.to_pandas()) == int(
          df.shape[0] * 0.1 + 5 + 2 - 1
      )
      tsdata_train.feature_col.append("new extra feature")
      assert len(tsdata_train.feature_col) == 2
      assert len(tsdata_valid.feature_col) == 1
      assert len(tsdata_test.feature_col) == 1
  
      tsdata_train.target_col[0] = "new value"
      assert tsdata_train.target_col[0] == "new value"
      assert tsdata_valid.target_col[0] != "new value"
      assert tsdata_test.target_col[0] != "new value"
  
imports: import pytest
  import numpy
  import pandas
  import random
  import tempfile
  import os
  import shutil
  from test.zoo.pipeline.utils.test_utils import ZooTestCase
  from zoo.chronos.data import TSDataset
  from pandas.testing import assert_frame_equal
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 21 for calling the TestTSDataset obj's underlying member method code with example usage: obj.test_tsdataset_split() without return types