def _extract_packet_from_data(self, data, got_first_packet=True):
        """Returns a packet's data and any remaining data after reading that first packet"""
        start_index = 0
        data = data.lstrip()
        if data.startswith(b'{"ind'):
            # Skip the 'index' JSONs, generated for Elastic.
            # See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=16656
            start_index = data.find(_ENCODED_OS_LINESEP) + 1
        linesep_location = data.find(_ENCODED_OS_LINESEP, start_index)
        if linesep_location == -1:
            return None, data

        return data[start_index:linesep_location], data[linesep_location + 1:]
Returns a packet's data and any remaining data after reading that first packet
src/pyshark/tshark/output_parser/tshark_ek.py