code: def testGather(self):
      model = model_helper.ModelHelper(name="test_model")
      model.net.Gather(["X", "idx"], "Y")
      workspace.FeedBlob(
          "X", np.random.rand(100, 4, 5).astype(np.float32)
      )
      workspace.FeedBlob(
          "idx", np.array([[3, 18], [99, 4], [2, 5]]).astype(np.int32)
      )
      self.InferTensorRunAndCompare(model)
  
imports: import numpy
  import unittest
  from caffe2.proto import caffe2_pb2
  from caffe2.python import core, workspace, test_util, model_helper, brew, build
label_desc: Use image node_id 7 for calling the TestShapeInference obj's underlying member method code with example usage: obj.testGather() without return types