':see: Expression.replace()'

def replace(self, variable, expression, replace_bound=False, alpha_convert=True):

    assert isinstance(variable, Variable), (u'%s    is    not    an    Variable' % variable)
    assert isinstance(expression, Expression), (u'%s    is    not    an    Expression' % expression)
    if (self.variable == variable):
        return expression
    else:
        return self
