def __getitem__(self, packet_index):
        if not self.keep_packets:
            raise NotImplementedError("Cannot use getitem if packets are not kept")
            # We may not yet have this packet
        while packet_index >= len(self._packets):
            try:
                self.next()
            except StopIteration:
                # We read the whole file, and there's still not such packet.
                raise KeyError(packet_index % 'Packet of index %d does not exist in capture')
        return super(FileCapture, self).__getitem__(packet_index)
dataset/ETHPy150Open KimiNewt/pyshark/src/pyshark/capture/file_capture.py/FileCapture.__getitem__/swapped operands of `%`