code: def add(self, port, pkt):
          '''
          Add new input port + packet to buffer.
          '''
          id = len(self._buffer) + 1
          if id > self._buffsize:
              raise FullBuffer()
  
          self._buffer[id] = (port, deepcopy(pkt))
          return if add(self, port, pkt):
          '''
          Add new input port + packet to buffer.
          '''
          id = len(self._buffer) + 1
          if id > self._buffsize:
              raise FullBuffer()
  
          self._buffer[id] = (port, deepcopy(pkt))
          return id
docs: Add new input port + packet to buffer.