code: def test_builder_invalid_indices(
      self, backend, indices_val, validate_indices
  ):
      def prog(x):
          params = np.array([[1, 2, 3], [4, 5, 6]], dtype=np.float32)
          indices = np.array(indices_val, dtype=np.int32)
          res = mb.gather_along_axis(x=params, indices=indices, axis=0)
          return res
  
      if any(
          [
              idx > 1
              for sub_indices in indices_val
              for idx in sub_indices
          ]
      ):
          with pytest.raises(
              IndexError,
              match="index 2 is out of bounds for axis 0 with size 2",
          ):
              mb.program(
                  input_specs=[
                      mb.TensorSpec(shape=(1,), dtype=types.fp32)
                  ],
                  opset_version=backend.opset_version,
              )(prog)
      else:
          mb.program(
              input_specs=[mb.TensorSpec(shape=(1,), dtype=types.fp32)],
              opset_version=backend.opset_version,
          )(prog)
  
imports: import itertools
  import numpy
  import pytest
  import coremltools
  from coremltools._deps import _HAS_TF_2, MSG_TF2_NOT_FOUND
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.ops.tests.iOS14 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 5 for calling the TestGatherAlongAxis obj's underlying member method code with example usage: obj.test_builder_invalid_indices(backend, indices_val, validate_indices) and returns: res