code: def _test_shape_inference(
      self,
      original_inp,
      value_to_pct_map,
      dist_lengths,
      expected_values,
  ):
      net = core.Net("test_shape_inference")
      result = net.Percentile(
          ["original_values", "value_to_pct_map", "dist_lengths"],
          ["percentile_values"],
      )
      workspace.FeedBlob(
          "original_values", np.array(original_inp, dtype=np.float32)
      )
      workspace.FeedBlob(
          "value_to_pct_map",
          np.array(value_to_pct_map, dtype=np.float32),
      )
      workspace.FeedBlob(
          "dist_lengths", np.array(dist_lengths, dtype=np.int32)
      )
      (shapes, types) = workspace.InferShapesAndTypes([net])
      workspace.RunNetOnce(net)
      self.assertEqual(
          shapes[result], list(workspace.blobs[result].shape)
      )
      self.assertEqual(
          shapes[result], list(workspace.blobs["original_values"].shape)
      )
      self.assertEqual(types[result], core.DataType.FLOAT)
  
file_path: pytorch/caffe2/python/operator_test/percentile_op_test.py
imports: from caffe2.python import core, workspace
  import caffe2.python.hypothesis_test_util
  import numpy
label_desc: Use image node_id 2 for calling the TestPercentileOp obj's underlying member method code with example usage: obj._test_shape_inference(original_inp, value_to_pct_map, dist_lengths, expected_values) without return types