code: def _testMediumTopK(self, dtype):
      b = 5
      n = 500
      k = 50
      inputs = np.random.permutation(
          np.linspace(0, 100, b * n, dtype=dtype)
      ).reshape(b, n)
      indices = np.argsort(-inputs, axis=1)[:, :k]
      values = -np.sort(-inputs, axis=1)[:, :k]
      self._validateTopK(inputs, k, values, indices)
  
imports: import itertools
  import sys
  import numpy
  from tensorflow.python.client import session
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import resource_variable_ops
  import tensorflow.python.ops.nn_grad
  from tensorflow.python.platform import test
label_desc: Use image node_id 12 for calling the TopKTest obj's underlying member method code with example usage: obj._testMediumTopK(dtype) without return types