def simplify(self):
result = self.__class__(self._variables, self._offset)<EOL>if len(result._variables) == <NUM_LIT:0>:<EOL><INDENT>return result._offset<EOL><DEDENT>elif len(result._variables) == <NUM_LIT:1> and result._offset == <NUM_LIT:0>:<EOL><INDENT>var, value = next(iteritems(result._variables))<EOL>if value == <NUM_LIT:1>:<EOL><INDENT>return var<EOL><DEDENT><DEDENT>return result<EOL>
Return simplified expression.

        If the expression is of the form 'x', the variable will be returned,
        and if the expression contains no variables, the offset will be
        returned as a number.