code: def __onNewValue(self, dataSeries, dateTime, value):
      if self.__range is None:
          self.__range = resamplebase.build_range(
              dateTime, self.__frequency
          )
          self.__grouper = self.buildGrouper(
              self.__range, value, self.__frequency
          )
      elif self.__range.belongs(dateTime):
          self.__grouper.addValue(value)
      else:
          self.appendWithDateTime(
              self.__grouper.getDateTime(), self.__grouper.getGrouped()
          )
          self.__range = resamplebase.build_range(
              dateTime, self.__frequency
          )
          self.__grouper = self.buildGrouper(
              self.__range, value, self.__frequency
          )
  
imports: import abc
  import six
  from pyalgotrade import dataseries
  from pyalgotrade.dataseries import bards
  from pyalgotrade import bar
  from pyalgotrade import resamplebase
label_desc: Use image node_id 3 for calling the DSResampler obj's underlying member method code with example usage: obj.__onNewValue(dataSeries, dateTime, value) without return types