code: def _test_random_object_bbox_auto_bg(fg_labels, expected_bg):
      """Checks that a correct background labels is chosen:
      0, if 0 is not present in the list of foreground classes
      smallest label - 1 if 0 is present
      if the smallest label -1 overflows, decrement the label until no collision
      """
      pipe = dali.Pipeline(
          batch_size=1, num_threads=1, device_id=0, seed=1234
      )
      data = np.uint32([0, 1, 2, 3])
  
      box, label = fn.segmentation.random_object_bbox(
          data,
          foreground_prob=1e-9,
          format="box",
          output_class=1,
          classes=fg_labels,
      )
  
      pipe.set_outputs(box, label)
      pipe.build()
      _, labels = pipe.run()
      assert int(labels.at(0)) == expected_bg
  
imports: from nose_utils import assert_raises
  import nvidia.dali
  import nvidia.dali.fn
  import nvidia.dali.ops
  import numpy
  import scipy.ndimage
  import scipy.ndimage.measurements
  import random
  from test_utils import check_batch, np_type_to_dali
  from nose.tools import nottest
  from nose.plugins.attrib import attr
label_desc: Use image node_id 27 for calling a global function with example usage: _test_random_object_bbox_auto_bg(fg_labels, expected_bg) without return types