def __setstate__(self, state):
    """deserialization"""
    self.__dict__.update(state)

    if not hasattr(self, '_mode'):
      self._mode = Anomaly.MODE_PURE
    if not hasattr(self, '_movingAverage'):
      self._movingAverage = None
    if not hasattr(self, '_binaryThreshold'):
      self._binaryThreshold = None
def __setstate__ ( self , state ) : self . __dict__ . update ( state ) if not hasattr ( self , '_mode' ) : self . _mode = Anomaly . MODE_PURE if not hasattr ( self , '_movingAverage' ) : self . _movingAverage = None if not hasattr ( self , '_binaryThreshold' ) : self . _binaryThreshold = None
deserialization