code: def sign(self, msg, key):
          
          h = hmac.HMAC(key, self.algorithm(), default_backend())
          h.update(msg)
          return h.finalize()
docs: Create a signature over a message as defined in RFC7515 using a
          symmetric key
  
          :param msg: The message
          :param key: The key
          :return: A signature