code: def FromReadings(cls, uuid, readings, root_key=AuthProvider.NoKey, signer=None,
                       report_id=IOTileReading.InvalidReadingID, selector=0xFFFF, streamer=0, sent_timestamp=0):
          lowest_id = IOTileReading.InvalidReadingID
          highest_id = IOTileReading.InvalidReadingID
          report_len = 20 + 16*len(readings) + 24
          len_low = report_len & 0xFF
          len_high = report_len >> 8
          unique_readings = [x.reading_id for x in readings if x.reading_id != IOTileReading.InvalidReadingID]
          if len(unique_readings) > 0:
              lowest_id = min(unique_readings)
              highest_id = max(unique_readings)
          header = struct.pack("<BBHLLLBBH", cls.ReportType, len_low, len_high, uuid, report_id,
                               sent_timestamp, root_key, streamer, selector)
          header = bytearray(header)
          packed_readings = bytearray()
          for reading in readings:
              packed_reading = struct.pack("<HHLLL", reading.stream, 0, reading.reading_id,
                                           reading.raw_time, reading.value)
              packed_readings += bytearray(packed_reading)
          footer_stats = struct.pack("<LL", lowest_id, highest_id)
          if signer is None:
              signer = ChainedAuthProvider()
          if root_key != signer.NoKey:
              enc_data = packed_readings
              try:
                  result = signer.encrypt_report(uuid, root_key, enc_data, report_id=report_id,
                                                 sent_timestamp=sent_timestamp)
              except NotFoundError:
                  raise ExternalError("Could not encrypt report because no AuthProvider supported "
                                      "the requested encryption method for the requested device",
                                      device_id=uuid, root_key=root_key)
              signed_data = header + result['data'] + footer_stats
          else:
              signed_data = header + packed_readings + footer_stats
          try:
              signature = signer.sign_report(uuid, root_key, signed_data, report_id=report_id,
                                             sent_timestamp=sent_timestamp)
          except NotFoundError:
              raise ExternalError("Could not sign report because no AuthProvider supported the requested "
                                  "signature method for the requested device", device_id=uuid, root_key=root_key)
          footer = struct.pack("16s", bytes(signature['signature'][:16]))
          footer = bytearray(footer)
          data = signed_data + footer
          return SignedListReport(data)