code: def __onNewValue2(self, dataSeries, dateTime, value):
      pos1 = self.__findPosForDateTime(self.__values1, dateTime)
      # If a value for dateTime was added to second dataseries, and a value for that same datetime is also in the first one
      # then append to both destination dataseries.
      if pos1 is not None:
          self.__append(dateTime, self.__values1[pos1][1], value)
          # Reset buffers.
          self.__values1 = self.__values1[pos1 + 1 :]
          self.__values2 = []
      else:
          # Since source dataseries may not hold all the values we need, we need to buffer manually.
          self.__values2.append((dateTime, value))
  
file_path: pyalgotrade/pyalgotrade/dataseries/aligned.py
imports: from pyalgotrade import dataseries
label_desc: Use image node_id 4 for calling the Syncer obj's underlying member method code with example usage: obj.__onNewValue2(dataSeries, dateTime, value) without return types