code: def GetKeyByScriptHash(self, script_hash):
          
          contract = self.GetContract(script_hash)
          if contract:
              return self.GetKey(contract.PublicKeyHash)
          return None
docs: Get the KeyPair belonging to the script hash.
  
          Args:
              script_hash (UInt160): a bytearray (len 20) representing the public key.
  
          Returns:
              KeyPair: If successful, the KeyPair belonging to the public key hash, otherwise None