code: def test_top_k_5(self, bs, n, flatten_indices, gc, dc):
      k = n
      X = np.random.rand(bs, n).astype(dtype=np.float32)
  
      output_list = ["Values", "Indices"]
      if flatten_indices:
          output_list.append("FlattenIndices")
      op = core.CreateOperator(
          "TopK", ["X"], output_list, k=k, device_option=gc
      )
  
      def bind_ref(X_loc):
          return self.top_k_ref(X_loc, k, flatten_indices)
  
      self.assertReferenceChecks(gc, op, [X], bind_ref)
      self.assertDeviceChecks(dc, op, [X], [0])
  
file_path: pytorch/caffe2/python/operator_test/top_k_test.py
imports: import hypothesis.strategies
  import numpy
  from caffe2.python import core
  from hypothesis import given, settings
  import caffe2.python.hypothesis_test_util
  import caffe2.python.serialized_test.serialized_test_util
label_desc: Use image node_id 7 for calling the TestTopK obj's underlying member method code with example usage: obj.test_top_k_5(bs, n, flatten_indices, gc, dc) and returns: self