code: def get_image_id(filename):
      """Convert a string to a integer."""
      # Warning: this function is highly specific to pascal filename!!
      # Given filename like '2008_000002', we cannot use id 2008000002 because our
      # code internally will convert the int value to float32 and back to int, which
      # would cause value mismatch int(float32(2008000002)) != int(2008000002).
      # COCO needs int values, here we just use a incremental global_id, but
      # users should customize their own ways to generate filename.
      del filename
      global GLOBAL_IMG_ID
      GLOBAL_IMG_ID += 1
      return GLOBAL_IMG_ID
  
file_path: DALI/docs/examples/use_cases/tensorflow/efficientdet/dataset/create_pascal_tfrecord.py
imports: import hashlib
  import io
  import json
  import os
  from absl import app
  from absl import flags
  from absl import logging
  from lxml import etree
  import PIL.Image
  import tensorflow
  from dataset import tfrecord_util
label_desc: Use image node_id 1 for calling a global function with example usage: get_image_id(filename) and returns: GLOBAL_IMG_ID