class_docstr: Helper class for computing moving average and sliding window
class_docstr_tok: ["Helper","class","for","computing","moving","average","and","sliding","window"]
docstr: for loading this object
docstr_tok: ["for","loading","this","object"]
code: def __setstate__(self, state):
      """for loading this object"""
      self.__dict__.update(state)
  
      if not hasattr(self, "slidingWindow"):
          self.slidingWindow = []
  
      if not hasattr(self, "total"):
          self.total = 0
          self.slidingWindow = sum(self.slidingWindow)
  
file_path: nupic-legacy/src/nupic/utils.py
imports: import numbers
  from nupic.serializable import Serializable
label_desc: Use image node_id 6 for calling the MovingAverage obj's underlying member method code with example usage: obj.__setstate__(state) without return types