code: def test_shape_and_type_inference(self):
      with hu.temp_workspace("shape_type_inf_int32"):
          net = core.Net("test_net")
          net.ConstantFill(
              [], "ranges", shape=[3, 5, 2], dtype=core.DataType.INT32
          )
          net.ConstantFill(
              [], "values", shape=[64], dtype=core.DataType.INT64
          )
          net.GatherRanges(
              ["values", "ranges"], ["values_output", "lengths_output"]
          )
          (shapes, types) = workspace.InferShapesAndTypes([net], {})
  
          self.assertEqual(shapes["values_output"], [64])
          self.assertEqual(types["values_output"], core.DataType.INT64)
          self.assertEqual(shapes["lengths_output"], [3])
          self.assertEqual(types["lengths_output"], core.DataType.INT32)
  
file_path: pytorch/caffe2/python/operator_test/gather_ranges_op_test.py
imports: import caffe2.python.hypothesis_test_util
  import caffe2.python.serialized_test.serialized_test_util
  import numpy
  from caffe2.python import core, workspace
  from hypothesis import given, settings, strategies
label_desc: Use image node_id 4 for calling the TestGatherRanges obj's underlying member method code with example usage: obj.test_shape_and_type_inference() without return types