code: def test_select_masks_wrong_vertex_ids():
      def test_data():
          polygons = [
              np.array([[0, 0, 20]], dtype=np.int32)
          ]  # Out of bounds vertex index
          vertices = [
              np.array(np.random.rand(3, 2), dtype=np.float32)
          ]  # Only 3 vertices
          mask_ids = [np.array([0], dtype=np.int32)]
          return polygons, vertices, mask_ids
  
      _test_select_masks_wrong_input(
          lambda: test_data(),
          err_regex="Vertex index range for mask id .* is out of bounds\\. "
          "Expected to be within the range of available vertices .*\\.",
      )
  
file_path: DALI/dali/test/python/operator_2/test_segmentation_select_masks.py
imports: from nose_utils import assert_raises
  import numpy
  import nvidia.dali
  import nvidia.dali.fn
  import random
  from segmentation_test_utils import make_batch_select_masks
label_desc: Use image node_id 7 for calling a global function with example usage: test_select_masks_wrong_vertex_ids() and returns: polygons,  vertices,  mask_ids