<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

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 id