code: def sort(a, axis=-1, kind="quicksort", order=None):
      """
  
      Parameters
      ----------
      a : Tensor
          Tensor to be sorted
      axis : Tensor
          Axis along which to sort. If None, the array is flattened before
          sorting.
      kind : {'quicksort', 'mergesort', 'heapsort'}, optional
          Sorting algorithm. Default is 'quicksort'.
      order : list, optional
          When `a` is a structured array, this argument specifies which
          fields to compare first, second, and so on. This list does not
          need to include all of the fields.
  
      Returns
      -------
      array
          A sorted copy of an array.
  
      """
      if axis is None:
          a = a.flatten()
          axis = 0
      return SortOp(kind, order)(a, axis)
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import theano
  from theano.tensor.basic import mul, arange
  from theano.gradient import grad_undefined
  from theano.tensor.subtensor import set_subtensor
label_desc: Use image node_id 3 for calling a global function with example usage: sort(a, axis, kind, order) and returns: SortOp