def build_packets(self, packet_1, packet_3):
    packets = [packet_1, packet_3]
    for x in range(2):
        sorted_packet = [value for (key, value) in sorted(packets[x].items())]
        packet_no_checksum = ''.join(sorted_packet)
        checksum = self.calculate_checksum(packet_no_checksum)
        packet_with_checksum = (packet_no_checksum + checksum)
        packet_send = bytes.fromhex(''.join(packet_with_checksum))
        if (x == 0):
            self.packet_1_with_checksum = packet_with_checksum
            self.packet_1_send = packet_send
        else:
            self.packet_3_with_checksum = packet_with_checksum
            self.packet_3_send = packet_send
def build_packets(self, packet_1, packet_3):
    packets = [packet_1, packet_3]
    for x in range(2):
        sorted_packet = [value for (key, value) in sorted(packets[x].items())]
        packet_no_checksum = .join(sorted_packet)
        checksum = self.calculate_checksum(packet_no_checksum)
        packet_with_checksum = (packet_no_checksum + checksum)
        packet_send = bytes.fromhex(.join(packet_with_checksum))
        if (x == 0):
            self.packet_1_with_checksum = packet_with_checksum
            self.packet_1_send = packet_send
        else:
            self.packet_3_with_checksum = packet_with_checksum
            self.packet_3_send = packet_send