code: def topk_sorted_implementation(X, k, axis, largest):  # type: ignore
      sorted_indices = np.argsort(X, axis=axis)
      sorted_values = np.sort(X, axis=axis)
      if largest:
          sorted_indices = np.flip(sorted_indices, axis=axis)
          sorted_values = np.flip(sorted_values, axis=axis)
      topk_sorted_indices = np.take(
          sorted_indices, np.arange(k), axis=axis
      )
      topk_sorted_values = np.take(
          sorted_values, np.arange(k), axis=axis
      )
      return topk_sorted_values, np.array(
          topk_sorted_indices, dtype=np.int64
      )
  
file_path: onnx/onnx/backend/test/case/node/topk.py
imports: import numpy
  import onnx
  from onnx.backend.test.case.base import Base
  from onnx.backend.test.case.node import expect
label_desc: Use image node_id 1 for calling a global function with example usage: topk_sorted_implementation(X, k, axis, largest) and returns: topk_sorted_values,  np