code: def _deserialize_image_record(record):
      feature_map = {
          "image/encoded": tf.io.FixedLenFeature([], tf.string, ""),
          "image/class/label": tf.io.FixedLenFeature([1], tf.int64, -1),
          "image/class/text": tf.io.FixedLenFeature([], tf.string, ""),
          "image/object/bbox/xmin": tf.io.VarLenFeature(
              dtype=tf.float32
          ),
          "image/object/bbox/ymin": tf.io.VarLenFeature(
              dtype=tf.float32
          ),
          "image/object/bbox/xmax": tf.io.VarLenFeature(
              dtype=tf.float32
          ),
          "image/object/bbox/ymax": tf.io.VarLenFeature(
              dtype=tf.float32
          ),
      }
      with tf.name_scope("deserialize_image_record"):
          obj = tf.io.parse_single_example(record, feature_map)
          imgdata = obj["image/encoded"]
          label = tf.cast(obj["image/class/label"], tf.int32)
          bbox = tf.stack(
              [
                  obj["image/object/bbox/%s" % x].values
                  for x in ["ymin", "xmin", "ymax", "xmax"]
              ]
          )
          bbox = tf.transpose(tf.expand_dims(bbox, 0), [0, 2, 1])
          text = obj["image/class/text"]
          return imgdata, label, bbox, text
  
imports: import tensorflow
  import sys
  import os
  import numpy
  from subprocess import call
  import horovod.tensorflow.keras
  from nvidia.dali.pipeline import pipeline_def
  import nvidia.dali.fn
  import nvidia.dali.types
  import nvidia.dali.tfrecord
label_desc: Use image node_id 1 for calling a global function with example usage: _deserialize_image_record(record) and returns: imgdata,  label,  bbox,  text