<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def record_calculation_end(self, variable_name, period, result, **parameters):
 """ Record that OpenFisca finished computing a variable. :param str variable_name: Name of the variable starting to be computed :param Period period: Period for which the variable is being computed :param numpy.ndarray result: Result of the computation :param list parameters: Parameter with which the variable is being computed """

        key = self._get_key(variable_name, period, **parameters)
        expected_key = self.stack.pop()

        if not key == expected_key:
            raise ValueError(
                "Something went wrong with the simulation tracer: result of '{0}' was expected, got results for '{1}' instead. This does not make sense as the last variable we started computing was '{0}'."
                .format(expected_key, key)
                )
        self.trace[key]['value'] = result