code: def SortEigenDecomposition(e, v):
      if v.ndim < 2:
          return e, v
      perm = np.argsort(e.real + e.imag, -1)
      return np.take(e, perm, -1), np.take(v, perm, -1)
  
imports: import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_linalg_ops
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import linalg_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import sort_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling a global function with example usage: SortEigenDecomposition(e, v) and returns: np,  np, e,  v