def get_value(self, expression):
if isinstance(expression, Expression):<EOL><INDENT>return self._evaluate_expression(expression)<EOL><DEDENT>elif not self._has_variable(expression):<EOL><INDENT>raise ValueError('<STR_LIT>'.format(expression))<EOL><DEDENT>return self._get_value(expression)<EOL>
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.