'A compatibility function for ordering terms in Add.'

def _as_ordered_terms(self, expr, order=None):

    order = (order or self.order)
    if (order == 'old'):
        return sorted(Add.make_args(expr), key=cmp_to_key(Basic._compare_pretty))
    else:
        return expr.as_ordered_terms(order=order)
