code: def sign_message(self, key, message, verbose=False):
          
          secret_exponent = key.secret_exponent()
          if not secret_exponent:
              raise ValueError("Private key is required to sign a message")
  
          addr = key.address()
  
          msg_hash = self.hash_for_signing(message)
          is_compressed = key.is_compressed()
  
          sig = self.signature_for_message_hash(secret_exponent, msg_hash, is_compressed)
  
          if not verbose or message is None:
              return sig
  
          return self.signature_template.format(
              msg=message, sig=sig, addr=addr,
              net_name=self._network_name.upper())
docs: Return a signature, encoded in Base64, which can be verified by anyone using the
          public key.