def _unevaluated_Add(*args):
 args = list(args)
 newargs = []
 co = S.Zero
 while args:
  a = args.pop()
  if a.is_Add:
   args.extend(a.args)
  elif a.is_Number:
   co += a
  else:
   newargs.append(a)
 _addsort(newargs)
 if co:
  newargs.insert(0, co)
 return Add._from_args(newargs)

def _unevaluated_Add ( * args ) : args = list ( args ) newargs = [ ] co = S . Zero while args : a = args . pop ( ) if a . is_Add : args . extend ( a . args ) elif a . is_Number : co += a else : newargs . append ( a ) _addsort ( newargs ) if co : newargs . insert ( 0 , co ) return Add . _from_args ( newargs )
return a well-formed unevaluated add: numbers are collected and put in slot 0 and args are sorted .