async def _get_psml_struct(self, fd):
        """Gets the current PSML (packet summary xml) structure in a tuple ((None, leftover_data)),
        only if the capture is configured to return it, else returns (None, leftover_data).

        A coroutine.
        """
        initial_data = b""
        psml_struct = None

        # If summaries are read, we need the psdml structure which appears on top of the file.
        while not psml_struct:
            new_data = await fd.read(self.SUMMARIES_BATCH_SIZE)
            initial_data += new_data
            psml_struct, initial_data = _extract_tag_from_xml_data(initial_data, b"structure")
            if psml_struct:
                self._psml_structure = psml_structure_from_xml(psml_struct)
            elif not new_data:
                return initial_data
        return initial_data
Gets the current PSML (packet summary xml) structure in a tuple ((None, leftover_data)),
        only if the capture is configured to return it, else returns (None, leftover_data).

        A coroutine.
        
src/pyshark/tshark/output_parser/tshark_xml.py