class_docstr: Applies a set of data transformations individually to an input time series.
  Stacks all of the results into a multivariate time series.
class_docstr_tok: ["Applies","a","set","of","data","transformations","individually","to","an","input","time","series",".","Stacks","all","of","the","results","into","a","multivariate","time","series","."]
code: def invert(
      self, time_series: TimeSeries, retain_inversion_state=False
  ) -> TimeSeries:
      if self.inversion_state is None:
          raise RuntimeError(
              "Inversion state not set. Please call this transform on an "
              "input time series before calling invert(). If you are trying "
              "to call invert() a second time, please supply the option "
              "`retain_inversion_state=True` to the first call."
          )
  
      idx, d0, df, names = self.inversion_state
      ts = TimeSeries(
          OrderedDict(
              (n, time_series.univariates[n])
              for n in time_series.names[d0:df]
          )
      )
      inverted = self.transforms[idx].invert(ts, retain_inversion_state)
      assert inverted.dim == len(names)
      inverted = TimeSeries(
          OrderedDict(
              (name, var)
              for name, var in zip(names, inverted.univariates)
          )
      )
  
      if not retain_inversion_state:
          self.inversion_state = None
      return inverted
  
imports: from collections import OrderedDict
  import logging
  from typing import List
  from merlion.transform.base import TransformBase, InvertibleTransformBase, Identity
  from merlion.transform.factory import TransformFactory
  from merlion.utils import TimeSeries
label_desc: Use image node_id 6 for calling the TransformStack obj's underlying member method code with example usage: obj.invert(time_series, retain_inversion_state) and returns: inverted