code: def checksum(self):
          
          total = 0
  
          # Add together all bytes
          for byte in self.data:
              total += byteToInt(byte)
  
          # Only keep the last byte
          total = total & 0xFF
  
          return intToByte(0xFF - total)
docs: checksum: None -> single checksum byte
  
          checksum adds all bytes of the binary, unescaped data in the
          frame, saves the last byte of the result, and subtracts it from
          0xFF. The final result is the checksum