def __eq__(self, other):
    return (isinstance(other, Apply) and (other.function == self.function) and (other.args == self.args))
def __eq__(self, other):
    return (isinstance(other, Apply) and (other.function == self.function) and (other.args == self.args))