code: def sign_report(self, device_id, root, data, **kwargs):
          
  
          report_key = self._verify_derive_key(device_id, root, **kwargs)
  
          # We sign the SHA256 hash of the message
          message_hash = hashlib.sha256(data).digest()
          hmac_calc = hmac.new(report_key, message_hash, hashlib.sha256)
          result = bytearray(hmac_calc.digest())
  
          return {'signature': result, 'root_key': root}
docs: Sign a buffer of report data on behalf of a device.
  
          Args:
              device_id (int): The id of the device that we should encrypt for
              root (int): The root key type that should be used to generate the report
              data (bytearray): The data that we should sign
              **kwargs: There are additional specific keyword args that are required
                  depending on the root key used.  Typically, you must specify
                  - report_id (int): The report id
                  - sent_timestamp (int): The sent timestamp of the report
  
                  These two bits of information are used to construct the per report
                  signing and encryption key from the specific root key type.
  
          Returns:
              dict: The signature and any associated metadata about the signature.
                  The signature itself must always be a bytearray stored under the
                  'signature' key, however additional keys may be present depending
                  on the signature method used.
  
          Raises:
              NotFoundError: If the auth provider is not able to sign the data.