code: def to_image_dataset(image_pipeline_desc, device_str):
      dataset_pipeline, shapes, dtypes = image_pipeline_desc
      with tf.device(device_str):
          dali_dataset = dali_tf.DALIDataset(
              pipeline=dataset_pipeline,
              batch_size=dataset_pipeline.batch_size,
              output_shapes=shapes,
              output_dtypes=dtypes,
              num_threads=dataset_pipeline.num_threads,
              device_id=dataset_pipeline.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 8 for calling a global function with example usage: to_image_dataset(image_pipeline_desc, device_str) and returns: dali_dataset