code: def new_data(self, data):
      # A subsequent call, after a call to existing_data.
      spawn = self.spawn
      freshlen = len(data)
      spawn._before.write(data)
      if not self.searchwindowsize:
          if self.lookback:
              # search lookback + new data.
              old_len = spawn._buffer.tell()
              spawn._buffer.write(data)
              spawn._buffer.seek(max(0, old_len - self.lookback))
              window = spawn._buffer.read()
          else:
              # copy the whole buffer (really slow for large datasets).
              spawn._buffer.write(data)
              window = spawn.buffer
      else:
          if (
              len(data) >= self.searchwindowsize
              or not spawn._buffer.tell()
          ):
              window = data[-self.searchwindowsize :]
              spawn._buffer = spawn.buffer_type()
              spawn._buffer.write(window[-self.searchwindowsize :])
          else:
              spawn._buffer.write(data)
              new_len = spawn._buffer.tell()
              spawn._buffer.seek(
                  max(0, new_len - self.searchwindowsize)
              )
              window = spawn._buffer.read()
      return self.do_search(window, freshlen)
  
imports: import time
  from .exceptions import EOF, TIMEOUT
label_desc: Use image node_id 4 for calling the Expecter obj's underlying member method code with example usage: obj.new_data(data) and returns: self