code: def wrap_rtx(packet, payload_type, sequence_number, ssrc):
      
      rtx = RtpPacket(
          payload_type=payload_type,
          marker=packet.marker,
          sequence_number=sequence_number,
          timestamp=packet.timestamp,
          ssrc=ssrc,
          payload=pack('!H', packet.sequence_number) + packet.payload)
      rtx.csrc = packet.csrc
      rtx.extensions = packet.extensions
      return rtx
docs: Create a retransmission packet from a lost packet.