code: def SignMessage(self, message, script_hash):
          
  
          keypair = self.GetKeyByScriptHash(script_hash)
          prikey = bytes(keypair.PrivateKey)
          res = Crypto.Default().Sign(message, prikey)
          return res, keypair.PublicKey
docs: Sign a message with a specified script_hash.
  
          Args:
              message (str): a hex encoded message to sign
              script_hash (UInt160): a bytearray (len 20).
  
          Returns:
              str: the signed message