def equals(self, other, cache=None):
    return (isinstance(other, SortKey) and self.expr.equals(other.expr, cache=cache) and (self.ascending == other.ascending))
def equals(self, other, cache=None):
    return (isinstance(other, SortKey) and self.expr.equals(other.expr, cache=cache) and (self.ascending == other.ascending))