class_docstr: A version of ``topk`` for iOS 16+. This section documents the differences. The following are additional parameters for the iOS 16+ version. For the
  rest of the documentation, see `the iOS 15 version of topk <#coremltools.converters.mil.mil.ops.defs.iOS15.tensor_operation.topk>`_.
  
  Parameters
  ----------
  sort: const<bool> (Optional)
      * Defaults to ``True``.
      * If ``True``, ``top-k`` elements are themselves sorted.
        Otherwise, no particular ordering is guaranteed.
  return_indices: const<bool> (Optional)
      * Defaults to ``True``.
      * If ``True``, returns both values and indices. Otherwise, returns only the ``top-k`` values.
  
  Returns
  -------
  tensor<\*?, T>
      * Values of top/bottom ``k`` elements.
  
  tensor<\*?, int32>
      * Only returned when ``return_indices = True``
      * Indices of the top/bottom ``k`` elements along axis.
  
  Attributes
  ----------
  T: fp32, int32
class_docstr_tok: ["A","version","of","``","topk","``","for","iOS","16+",".","This","section","documents","the","differences",".","The","following","are","additional","parameters","for","the","iOS","16+","version",".","For","the","rest","of","the","documentation",",","see","`","the","iOS","15","version","of","topk","<","#","coremltools.converters.mil.mil.ops.defs.iOS15.tensor_operation.topk",">","`","_",".","Parameters","--","--","--","--","--","sort",":","const","<","bool",">","(","Optional",")","*","Defaults","to","``","True","``",".","*","If","``","True","``",",","``","top-k","``","elements","are","themselves","sorted",".","Otherwise",",","no","particular","ordering","is","guaranteed",".","return_indices",":","const","<","bool",">","(","Optional",")","*","Defaults","to","``","True","``",".","*","If","``","True","``",",","returns","both","values","and","indices",".","Otherwise",",","returns","only","the","``","top-k","``","values",".","Returns","--","--","--","-","tensor","<","\\","*","?",",","T",">","*","Values","of","top\/bottom","``","k","``","elements",".","tensor","<","\\","*","?",",","int32",">","*","Only","returned","when","``","return_indices","=","True","``","*","Indices","of","the","top\/bottom","``","k","``","elements","along","axis",".","Attributes","--","--","--","--","--","T",":","fp32",",","int32"]
code: def type_inference(self):
      value_type, indices_type = super().type_inference()
      if not self.return_indices.val:
          return value_type
      return value_type, indices_type
  
file_path: coremltools/coremltools/converters/mil/mil/ops/defs/iOS16/tensor_operation.py
imports: import numpy
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.input_type import DefaultInputs, InputSpec, TensorInputType
  from coremltools.converters.mil.mil.operation import VALUE, Operation, precondition
  from coremltools.converters.mil.mil.ops.defs._op_reqs import register_op
  from coremltools.converters.mil.mil.ops.defs.iOS15.tensor_operation import topk
  from coremltools.converters.mil.mil.ops.defs.iOS16 import _IOS16_TARGET
label_desc: Use image node_id 2 for calling the topk obj's underlying member method code with example usage: obj.type_inference() and returns: value_type,  indices_type, value_type