code: def test_l2ann(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])
      db_half_norm_sq = np.linalg.norm(db, axis=1) ** 2 / 2
      qy_op = constant_op.constant(qy, dtype=dtype)
      db_op = constant_op.constant(db, dtype=dtype)
      db_half_norm_sq_op = constant_op.constant(
          db_half_norm_sq, dtype=dtype
      )
  
      # Must jit-compile to access the xla kernel.
      @function(jit_compile=True)
      def ann(qy, db, db_half_norm_sq, k):
          scores = db_half_norm_sq - math_ops.matmul(
              qy, db, transpose_b=True
          )
          return nn_ops.approx_min_k(scores, k)
  
      _, idx = self.evaluate(ann(qy_op, db_op, db_half_norm_sq_op, k))
      scores = self.evaluate(
          db_half_norm_sq_op
          - 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 6 for calling the ApproxTopkTest obj's underlying member method code with example usage: obj.test_l2ann(dtype, k, db_size, qy_size, feature_dim) and returns: nn_ops