code: def get_dali_dataset_from_pipeline(
      pipeline_desc, device, device_id, to_dataset=to_image_dataset
  ):
      dali_dataset = to_dataset(
          pipeline_desc, "/{0}:{1}".format(device, device_id)
      )
      return dali_dataset
  
imports: import math
  import numpy
  import nvidia.dali.fn
  import nvidia.dali.plugin.tf
  import nvidia.dali.types
  import os
  import tensorflow
  from contextlib import contextmanager
  from nose import SkipTest
  from nvidia.dali.pipeline import Pipeline
  from tensorflow.python.client import device_lib
  from test_utils import to_array, get_dali_extra_path
label_desc: Use image node_id 9 for calling a global function with example usage: get_dali_dataset_from_pipeline(pipeline_desc, device, device_id, to_dataset) and returns: dali_dataset