code: def test_chain_branches_only_assign(pred_1, pred_2):
      def f(pred_1, pred_2, true_branch, elif_branch, else_branch):
          if pred_1:
              result = true_branch
          elif pred_2:
              result = elif_branch
          else:
              result = else_branch
          return result
  
      generic_execute(
          f,
          [
              pred_1,
              pred_2,
              lambda _: np.int32(42),
              lambda _: np.int32(6),
              lambda _: np.int32(9),
          ],
      )
  
imports: from nvidia.dali.pipeline import pipeline_def, experimental
  import nvidia.dali.fn
  import nvidia.dali.types
  from nvidia.dali.types import SampleInfo
  from nvidia.dali import _conditionals
  from nvidia.dali.data_node import DataNode
  import numpy
  import os
  from test_utils import check_batch, compare_pipelines
  from nose_utils import assert_raises
  from test_utils import get_dali_extra_path
  from nose2.tools import params
  import itertools
label_desc: Use image node_id 16 for calling a global function with example usage: test_chain_branches_only_assign(pred_1, pred_2) and returns: result