code: def topk(x, k):
      y = x.flatten()
      indices = np.argsort(np.abs(y))[-k:][::-1]
      vals = y[indices]
      y.fill(0)
      for idx, val in zip(indices, vals):
          y[idx] = val
      return y.reshape(x.shape)
  
file_path: byteps/tests/test_topk.py
imports: import itertools
  import random
  import unittest
  import byteps.mxnet
  import mxnet
  import mxnet.ndarray
  import numpy
  from gluoncv.model_zoo import get_model
  from mxnet import autograd, gluon
  from parameterized import parameterized
  from tqdm import tqdm
  from meta_test import MetaTest
  from utils import fake_data
label_desc: Use image node_id 1 for calling a global function with example usage: topk(x, k) and returns: y