code: def _blocking_destructor(device):
      batch_size = 5
      prefetch_queue_depth = 5
  
      @pipeline_def
      def test_pipeline():
          data = fn.external_source(
              dtype=types.INT32,
              name="test_source",
              blocking=True,
              device=device,
          )
          return data
  
      rng = default_rng()
      data_to_feed = rng.random(size=(batch_size, 4, 6, 2)).astype(
          dtype=np.int32
      )
  
      pipe = test_pipeline(
          batch_size=batch_size,
          num_threads=2,
          device_id=0,
          seed=12,
          prefetch_queue_depth=prefetch_queue_depth,
      )
      pipe.build()
      # feed one input to pipeline can return something
      pipe.feed_input("test_source", data_to_feed)
  
      # should not hang
      _ = pipe.run()
  
imports: import random
  import nvidia.dali.fn
  import nvidia.dali.ops
  import nvidia.dali.types
  import numpy
  from nvidia.dali import Pipeline, pipeline_def
  from test_utils import check_batch
  from nose_utils import raises, assert_warns, assert_raises
  from nvidia.dali.types import DALIDataType
  from numpy.random import default_rng
label_desc: Use image node_id 39 for calling a global function with example usage: _blocking_destructor(device) and returns: data