code: def test_builder_eval_batch_dims(self, backend):
      @mb.program(
          input_specs=[mb.TensorSpec(shape=(1,), dtype=types.fp32)],
          opset_version=backend.opset_version,
      )
      def prog(x):
          params = np.array(
              [[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]],
              dtype=np.float32,
          )
          indices = np.array(
              [[[1, 0], [0, 1]], [[1, 0], [0, 0]]], dtype=np.int32
          )
          res = mb.gather(
              x=params, indices=indices, axis=2, batch_dims=2
          )
          return res
  
      main_func = prog.functions["main"]
      gather_ops = main_func.find_ops(op_type="gather")[0]
  
      np.testing.assert_allclose(
          np.array(
              [[[2, 1], [4, 5]], [[8, 7], [10, 10]]], dtype=np.float32
          ),
          gather_ops.outputs[0].val,
          atol=1e-04,
          rtol=1e-05,
      )
  
file_path: coremltools/coremltools/converters/mil/mil/ops/tests/iOS16/test_scatter_gather.py
imports: import itertools
  import numpy
  import pytest
  import coremltools
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.ops.tests.iOS14.test_scatter_gather import TestGatherAlongAxis
  from coremltools.converters.mil.mil.ops.tests.iOS16 import backends
  from coremltools.converters.mil.mil.ops.tests.testing_utils import mark_api_breaking, run_compare_builder
  from coremltools.converters.mil.testing_reqs import compute_units
label_desc: Use image node_id 2 for calling the TestGather obj's underlying member method code with example usage: obj.test_builder_eval_batch_dims(backend) and returns: res