code: def topk(x, kth, axis=-1, sorted=True, idx_dtype="int64"):
      """
      Returns the k-largest elements along an axis.
  
      Parameters
      ----------
  
      x: tensor instance
  
      kth: integer constant/variable
          Must not be 0. If negative, gives k-smallest elements instead.
  
      axis: integer or ``None``
          Upon which axis shall the operation be performed on.
          If ``None``, works on flattened array.
  
      sorted: bool
          NOTE: NOT IMPLEMENTED YET, USE ``False`` FOR NOW.
          Defaults to ``True``
  
          If True, the result array would be sorted in descending order.
  
      idx_dtype: string
          Specify output dtype used in indices, defaults to ``int64``, must be integer type.
          This option is here because indices are needed for gradient.
  
      Returns
      -------
      Tensor variable with same dtype as `x`.
  
      Notes
      -----
      - ``sorted=True`` is not supported yet.
  
      """
      if axis is None:
          x = theano.tensor.flatten(x)
          axis = 0
      return TopKOp(axis=axis, sorted=sorted, idx_dtype=idx_dtype)(
          x, kth
      )[0]
  
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 6 for calling a global function with example usage: topk(x, kth, axis, sorted, idx_dtype) and returns: TopKOp