<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def packet_from_xml_packet(xml_pkt, psml_structure=None):
 """ 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. """

    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)