class_docstr: Truncate unequal length panels to lower/upper bounds.
  
  Truncates all series in panel between lower/upper range bounds.
  
  Parameters
  ----------
  lower : int, optional (default=None) bottom range of the values to
              truncate can also be used to truncate to a specific length
              if None, will find the shortest sequence and use instead.
  upper : int, optional (default=None) upper range, only required when
              paired with lower.
              This is used to calculate the range between. exclusive.
              if None, will truncate from 0 to the lower bound.
docstr: Transform X and return a transformed version.
  
  private _transform containing core logic, called from transform
  
  Parameters
  ----------
  X : nested pandas DataFrame of shape [n_instances, n_features]
      each cell of X must contain pandas.Series
      Data to transform
  y : ignored argument for interface compatibility
  
  Returns
  -------
  Xt : nested pandas DataFrame of shape [n_instances, n_features]
      each cell of Xt contains pandas.Series
      transformed version of X
code: def _transform(self, X, y=None):
      """Transform X and return a transformed version.
  
      private _transform containing core logic, called from transform
  
      Parameters
      ----------
      X : nested pandas DataFrame of shape [n_instances, n_features]
          each cell of X must contain pandas.Series
          Data to transform
      y : ignored argument for interface compatibility
  
      Returns
      -------
      Xt : nested pandas DataFrame of shape [n_instances, n_features]
          each cell of Xt contains pandas.Series
          transformed version of X
      """
      n_instances, _ = X.shape
  
      arr = [X.iloc[i, :].values for i in range(n_instances)]
  
      min_length = self._get_min_length(arr)
  
      if min_length < self.lower_:
          raise ValueError(
              "Error: min_length of series \
                      is less than the one found when fit or set."
          )
  
      # depending on inputs either find the shortest truncation.
      # or use the bounds.
      if self.upper is None:
          idxs = np.arange(self.lower_)
      else:
          idxs = np.arange(self.lower_, self.upper)
  
      truncate = [
          pd.Series([series.iloc[idxs] for series in out])
          for out in arr
      ]
  
      Xt = pd.DataFrame(truncate)
      Xt.columns = X.columns
      Xt.index = X.index
  
      return Xt
  
file_path: sktime/sktime/transformations/panel/truncation.py
imports: import numpy
  import pandas
  from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 4 for calling the TruncationTransformer obj's underlying member method code with example usage: obj._transform(X, y) and returns: Xt