code: def sort_ab_with_b(a, b, ord=-1):
      """default is descending..."""
      import numpy
  
      aa, bb = numpy.array(a), numpy.array(b)
      if ord == -1:
          o = list(reversed(bb.argsort()))
      else:
          o = b.argsort()
      return aa[o], bb[o]
  
file_path: mystic/mystic/scemtools.py
imports: import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: sort_ab_with_b(a, b, ord) and returns: aa,  bb