code: def train_test_split(series, split_ts):
      """
      Splits all provided TimeSeries instances into train and test sets according to the provided timestamp.
  
      Parameters
      ----------
      features : TimeSeries
          Feature TimeSeries instances to be split.
      target : TimeSeries
          Target TimeSeries instance to be split.
      split_ts : TimeStamp
          Time stamp indicating split point.
  
      Returns
      -------
      TYPE
          4-tuple of the form (train_features, train_target, test_features, test_target)
      """
      if isinstance(series, TimeSeries):
          return series.split_after(split_ts)
      else:
          return list(zip(*[ts.split_after(split_ts) for ts in series]))
  
imports: import copy
  import functools
  import itertools
  import math
  from unittest.mock import patch
  import numpy
  import pandas
  import pytest
  from sklearn.ensemble import HistGradientBoostingRegressor, RandomForestRegressor
  from sklearn.linear_model import LinearRegression
  import darts
  from darts import TimeSeries
  from darts.dataprocessing.encoders import FutureCyclicEncoder, PastDatetimeAttributeEncoder
  from darts.logging import get_logger
  from darts.metrics import mae, rmse
  from darts.models import CatBoostModel, LightGBMModel, LinearRegressionModel, NotImportedModule, RandomForest, RegressionModel, XGBModel
  from darts.utils import timeseries_generation
  from darts.utils.multioutput import MultiOutputRegressor
label_desc: Use image node_id 1 for calling a global function with example usage: train_test_split(series, split_ts) and returns: series, list