code: def packet_from_xml_packet(xml_pkt, psml_structure=None):
      
      if not isinstance(xml_pkt, lxml.objectify.ObjectifiedElement):
          parser = lxml.objectify.makeparser(huge_tree=True)
          xml_pkt = lxml.objectify.fromstring(xml_pkt, parser)
      if psml_structure:
          return _packet_from_psml_packet(xml_pkt, psml_structure)
      return _packet_from_pdml_packet(xml_pkt)
docs: Gets a TShark XML packet object or string, and returns a pyshark Packet objec.t
  
      :param xml_pkt: str or xml object.
      :param psml_structure: a list of the fields in each packet summary in the psml data. If given, packets will
      be returned as a PacketSummary object.
      :return: Packet object.