code: def test_mips(self, dtype, k, db_size, qy_size, feature_dim):
      qy = self._rng.random([qy_size, feature_dim])
      db = self._rng.random([db_size, feature_dim])
      qy_op = constant_op.constant(qy, dtype=dtype)
      db_op = constant_op.constant(db, dtype=dtype)
  
      # Must jit-compile to access the xla kernel.
      @function(jit_compile=True)
      def ann(qy, db, k):
          scores = math_ops.matmul(qy, db, transpose_b=True)
          return nn_ops.approx_max_k(scores, k)
  
      _, idx = self.evaluate(ann(qy_op, db_op, k))
      scores = self.evaluate(
          -math_ops.matmul(qy_op, db_op, transpose_b=True)
      )
      gt = np.argsort(scores)[:, :k]
      ann_recall = self.compute_recall(idx, gt)
      self.assertGreaterEqual(ann_recall, 0.95)
  
imports: import itertools
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager.def_function import function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 5 for calling the ApproxTopkTest obj's underlying member method code with example usage: obj.test_mips(dtype, k, db_size, qy_size, feature_dim) and returns: nn_ops