class_docstr: Computes the n_steps-step moving average of the time series, with
  the given relative weights assigned to each time in the moving average
  (default is to take the non-weighted average). Zero-pads the input time
  series to the left before taking the moving average.
class_docstr_tok: ["Computes","the","n_steps-step","moving","average","of","the","time","series",",","with","the","given","relative","weights","assigned","to","each","time","in","the","moving","average","(","default","is","to","take","the","non-weighted","average",")",".","Zero-pads","the","input","time","series","to","the","left","before","taking","the","moving","average","."]
code: def _invert(self, time_series: TimeSeries) -> TimeSeries:
      new_vars = OrderedDict()
      for name, var in time_series.items():
          left_pad = np.cumsum(self.weights[-1:0:-1]) * var.np_values[0]
          right_pad = np.full(self._n_pad, var.np_values[-1])
          y = np.concatenate((left_pad, var.np_values, right_pad))
          x = scipy.signal.deconvolve(y, self.weights[-1::-1])[0][
              self._n_pad :
          ]
          new_vars[name] = UnivariateTimeSeries(var.index, x)
  
      ret = TimeSeries(new_vars, check_aligned=False)
      ret._is_aligned = time_series.is_aligned
      return ret
  
imports: from collections import OrderedDict
  import logging
  from typing import Sequence
  import numpy
  import scipy.signal
  from scipy.stats import norm
  from merlion.transform.base import TransformBase, InvertibleTransformBase
  from merlion.utils import UnivariateTimeSeries, TimeSeries
label_desc: Use image node_id 6 for calling the MovingAverage obj's underlying member method code with example usage: obj._invert(time_series) and returns: ret