class_docstr: Split instances from a dataset, by slicing the target and other time series
  fields at points in time selected by the specified sampler. The assumption
  is that all time series fields start at the same time point.
  
  It is assumed that time axis is always the last axis.
  
  The ``target_field`` and each field in ``time_series_fields`` are removed and
  replaced by two new fields, with prefix `past_` and `future_` respectively.
  
  A ``past_is_pad`` is also added, that indicates whether values at a given
  time point are padding or not.
  
  Parameters
  ----------
  
  target_field
      field containing the target
  is_pad_field
      output field indicating whether padding happened
  start_field
      field containing the start date of the time series
  forecast_start_field
      output field that will contain the time point where the forecast starts
  instance_sampler
      instance sampler that provides sampling indices given a time series
  past_length
      length of the target seen before making prediction
  future_length
      length of the target that must be predicted
  lead_time
      gap between the past and future windows (default: 0)
  output_NTC
      whether to have time series output in (time, dimension) or in
      (dimension, time) layout (default: True)
  time_series_fields
      fields that contains time series, they are split in the same interval
      as the target (default: None)
  dummy_value
      Value to use for padding. (default: 0.0)
code: def _split_array(
      self, array: np.ndarray, idx: int
  ) -> Tuple[np.ndarray, np.ndarray]:
      if idx >= self.past_length:
          past_piece = array[..., idx - self.past_length : idx]
      else:
          past_piece = pad_axis(
              array[..., :idx],
              axis=-1,
              left=self.past_length - idx,
              value=self.dummy_value,
          )
  
      future_start = idx + self.lead_time
      future_slice = slice(
          future_start, future_start + self.future_length
      )
      future_piece = array[..., future_slice]
  
      return past_piece, future_piece
  
imports: from typing import Iterator, List, Optional, Tuple
  import numpy
  from pandas.tseries.offsets import BaseOffset
  from gluonts.core.component import validated
  from gluonts.dataset.common import DataEntry
  from gluonts.dataset.field_names import FieldName
  from gluonts.zebras._util import pad_axis
  from ._base import FlatMapTransformation
  from .sampler import ContinuousTimePointSampler, InstanceSampler
label_desc: Use image node_id 4 for calling the InstanceSplitter obj's underlying member method code with example usage: obj._split_array(array, idx) and returns: past_piece,  future_piece