def part_key(part):
 rval = []
 for ps in part:
  rval.append(ps.u)
  rval.append(ps.v)
 return tuple(rval)

def part_key ( part ) : rval = [ ] for ps in part : rval . append ( ps . u ) rval . append ( ps . v ) return tuple ( rval )
helper for multisetpartitiontraverser .