def record(self, traces):
        self._buffer.extend(traces)

        if len(self._buffer) >= self._max_traces:
            # The buffer is full, flush in the next _reactor iteration.  If
            # we have not already scheduled a flush to happen.
            if self._flush_dc is None:
                self._flush_dc = self._reactor.callLater(0, self._flush)

        else:
            # The buffer is not full, reset the idle timer to DelayedCall to
            # flush after 10 seconds.
            self._reset()
dataset/ETHPy150Open tryfer/tryfer/tryfer/tracers.py/BufferingTracer.record/original