code: def _pyshark_read_frame(self):
          
          from pcapkit.toolkit.pyshark import packet2dict, tcp_traceflow
  
          # fetch PyShark packet
          packet = next(self._extmp)
  
          # def _pyshark_packet2chain(packet):
          #     """Fetch PyShark packet protocol chain."""
          #     return ':'.join(map(lambda layer: layer.layer_name.upper(), packet.layers))
  
          # verbose output
          self._frnum = int(packet.number)
          self._proto = packet.frame_info.protocols
          if self._flag_v:
              print(f' - Frame {self._frnum:>3d}: {self._proto}')
  
          # write plist
          frnum = f'Frame {self._frnum}'
          if not self._flag_q:
              info = packet2dict(packet)
              if self._flag_f:
                  ofile = self._ofile(f'{self._ofnm}/{frnum}.{self._fext}')
                  ofile(info, name=frnum)
              else:
                  self._ofile(info, name=frnum)
  
          # record frames
          if self._flag_d:
              setattr(packet, 'packet2dict', packet2dict)
              self._frame.append(packet)
  
          # trace flows
          if self._flag_t:
              flag, data = tcp_traceflow(packet)
              if flag:
                  self._trace(data)
  
          return packet
docs: Read frames.