code: def load_box_level_labels(filepath):
      """Returns a dictionary mapping image IDs to a list of bounding box annotations."""
      image2boxes = collections.defaultdict(list)
      with tf.io.gfile.GFile(filepath, "r") as csvfile:
          reader = csv.reader(csvfile)
          next(reader)  # Skip header.
          for row in reader:
              if len(row) == 7:
                  (
                      image_id,
                      label,
                      xmin_s,
                      xmax_s,
                      ymin_s,
                      ymax_s,
                      is_group_of_s,
                  ) = row
              elif len(row) == 13:
                  image_id, label = row[0], row[2]
                  xmin_s, xmax_s, ymin_s, ymax_s = row[4:8]
                  is_group_of_s = row[10]
              xmin, xmax, ymin, ymax = map(
                  float, (xmin_s, xmax_s, ymin_s, ymax_s)
              )
              is_group_of = bool(int(is_group_of_s))
              image2boxes[image_id].append(
                  (label, xmin, xmax, ymin, ymax, is_group_of)
              )
      return image2boxes
  
imports: import collections
  import csv
  import io
  import json
  import os
  from absl import logging
  import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 2 for calling a global function with example usage: load_box_level_labels(filepath) and returns: image2boxes