code: def test_select_masks_wrong_mask_ids():
      def test_data():
          polygons = [
              np.array(
                  [[0, 0, 2], [1, 3, 5], [2, 6, 8]], dtype=np.int32
              )
          ]
          vertices = [np.array(np.random.rand(9, 2), dtype=np.float32)]
          mask_ids = [
              np.array([10, 11], dtype=np.int32)
          ]  # out of bounds ids
          return polygons, vertices, mask_ids
  
      _test_select_masks_wrong_input(
          lambda: test_data(),
          err_regex="Selected mask_id .* is not present in the input\\.",
      )
  
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 5 for calling a global function with example usage: test_select_masks_wrong_mask_ids() and returns: polygons,  vertices,  mask_ids