code: def onNewValue(self, dateTime, value):
      firstValue = None
      if len(self.getValues()) > 0:
          firstValue = self.getValues()[0]
          assert firstValue is not None
  
      super(SMAEventWindow, self).onNewValue(dateTime, value)
  
      if value is not None and self.windowFull():
          if self.__value is None:
              self.__value = self.getValues().mean()
          else:
              self.__value = (
                  self.__value
                  + value / float(self.getWindowSize())
                  - firstValue / float(self.getWindowSize())
              )
  
imports: import numpy
  from pyalgotrade import technical
label_desc: Use image node_id 2 for calling the SMAEventWindow obj's underlying member method code with example usage: obj.onNewValue(dateTime, value) without return types