<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getparams(self, result):
 """Get result parameters. :param result: cached result. :raises: ValueError if result is not cached. :return: args and kwargs registered with input result. :rtype: tuple"""


        for key in self._cache:
            if self._cache[key][2] == result:
                args, kwargs, _ = self._cache[key]
                return args, kwargs

        else:
            raise ValueError('Result is not cached')