code: def test_data_node_if_error():
      batch_size = 10
      kwargs = {
          "enable_conditionals": False,
          "batch_size": batch_size,
          "num_threads": 4,
          "device_id": 0,
      }
  
      @pipeline_def(**kwargs)
      def pipeline():
          predicate = fn.random.coin_flip()
          if predicate:
              output = types.Constant(np.array(42), device="cpu")
          else:
              output = types.Constant(np.array(0), device="cpu")
          return output
  
      with assert_raises(
          TypeError,
          glob='"DataNode" was used in conditional context*'
          " To use conditional execution via `if` statements you need to specify"
          " `enable_conditionals=True` in `@nvidia.dali.pipeline_def` decorator*",
      ):
          pipe = pipeline()
          pipe.build()
          pipe.run()
  
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 43 for calling a global function with example usage: test_data_node_if_error() and returns: output