<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GetKeyByScriptHash(self, script_hash):
 """ 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 """

        contract = self.GetContract(script_hash)
        if contract:
            return self.GetKey(contract.PublicKeyHash)
        return None