def get_storage(self, script_hash, key, **kwargs):
hexkey = binascii.hexlify(key.encode('<STR_LIT:utf-8>')).decode('<STR_LIT:utf-8>')<EOL>hexresult = self._call(<EOL>JSONRPCMethods.GET_STORAGE.value, params=[script_hash, hexkey, ], **kwargs)<EOL>try:<EOL><INDENT>assert hexresult<EOL>result = bytearray(binascii.unhexlify(hexresult.encode('<STR_LIT:utf-8>')))<EOL><DEDENT>except AssertionError:<EOL><INDENT>result = hexresult<EOL><DEDENT>return result<EOL>
Returns the value stored in the storage of a contract script hash for a given key.

        :param script_hash: contract script hash
        :param key: key to look up in the storage
        :type script_hash: str
        :type key: str
        :return: value associated with the storage key
        :rtype: bytearray