<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_value(self, expression):
 """Get value of variable or expression in result Expression can be an object defined as a name in the problem, in which case the corresponding value is simply returned. If expression is an actual :class:`.Expression` object, it will be evaluated using the values from the result. """

        if isinstance(expression, Expression):
            return self._evaluate_expression(expression)
        elif not self._has_variable(expression):
            raise ValueError('Unknown expression: {}'.format(expression))

        return self._get_value(expression)