code: def split(
      self,
      index,
      past_length=None,
      future_length=None,
      pad_value=0.0,
  ):
      if not isinstance(index, (int, np.integer)):
          # If `index` is provided as timestamp we turn it into an integer.
          index = self.index_of(index)
      elif index < 0:
          # Ensure index is >= 0; (turn negative values into positive ones)
          index = len(self) + index
  
      if not 0 <= index <= len(self):
          raise ValueError(
              "Split index out of bounds. Use `.resize(...)` or `.pad(...)` "
              "to ensure `TimeFrame` is long enough."
          )
  
      # If past_length is not provided, it will equal to `index`, since
      # `len(tf.split(5).past) == 5`
      past_length: int = maybe.unwrap_or(past_length, index)
  
      # Same logic applies to future_length, except that we deduct from the
      # right. (We can't use past_length, since it can be unequal to index).
      future_length: int = maybe.unwrap_or(
          future_length, len(self) - index
      )
  
      if self.index is None:
          new_index = None
      else:
          start = self.index.start + (index - past_length)
          new_index = start.periods(past_length + future_length)
  
      pad_left = max(0, past_length - index)
      pad_right = max(0, future_length - (len(self) - index))
      self = self.pad(pad_value, pad_left, pad_right)
  
      # We need to shift the split index to the right, if we padded values
      # on the left.
      index += pad_left
  
      def split_item(item):
          name, data = item
  
          tdim = self.tdims[name]
          past, future = np.split(data, [index], tdim)
          past = AxisView(past, tdim)[-past_length:]
          future = AxisView(future, tdim)[:future_length]
          return name, (past, future)
  
      past, future = columns_to_rows(itemmap(split_item, self.columns))
  
      return SplitFrame(
          _past=past,
          _future=future,
          index=new_index,
          static=self.static,
          past_length=past_length,
          future_length=future_length,
          tdims=self.tdims,
          metadata=self.metadata,
          _pad=self._pad,
      )
  
imports: from __future__ import annotations
  import dataclasses
  from operator import itemgetter
  from typing import cast, Optional, List, Union, Collection, Any, Mapping
  import numpy
  from toolz import first, valmap, dissoc, merge, itemmap, take
  from gluonts import maybe
  from gluonts.itertools import pluck_attr, columns_to_rows, rows_to_columns, select, join_items
  from ._base import Pad, TimeBase
  from ._freq import Freq
  from ._period import Periods, Period, period
  from ._repr import html_table
  from ._util import AxisView, pad_axis, _replace
  from ._time_series import BatchTimeSeries, TimeSeries
  from ._split_frame import SplitFrame
label_desc: Use image node_id 24 for calling the TimeFrame obj's underlying member method code with example usage: obj.split(index, past_length, future_length, pad_value) and returns: SplitFrame, name,  past,  future