code: def grad_sort(ans, x, axis=-1, kind="quicksort", order=None):
      # TODO: Cast input with np.asanyarray()
      if len(x.shape) > 1:
          raise NotImplementedError(
              "Gradient of sort not implemented for multi-dimensional arrays."
          )
      sort_perm = anp.argsort(x, axis, kind, order)
      return lambda g: unpermuter(g, sort_perm)
  
imports: from __future__ import absolute_import
  from six import string_types
  from functools import partial
  import numpy
  from ..util import func
  from .None import numpy_wrapper
  from .numpy_boxes import ArrayBox
  from autograd.extend import primitive, vspace, defvjp, defvjp_argnum, SparseObject, VJPNode, register_notrace
label_desc: Use image node_id 33 for calling a global function with example usage: grad_sort(ans, x, axis, kind, order) and returns: function