<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _process_packet(self, sequence):
 """ Check packet list for acks. """

        if self._packets:
            with self._packet_lock:
                self._packets[:] = [packet for packet in self._packets
                                    if self._packet_ack(packet, sequence)]