code: def _coco_annotations_to_lists(
      bbox_annotations: List[Mapping[str, Any]],
      image_height: int,
      image_width: int,
  ):
      """Converts COCO annotations to feature lists.
  
      Args:
        bbox_annotations: List of dicts with keys ['bbox', 'category_id']
        image_height: Height of image
        image_width: Width of image
  
      Returns:
        (data, num_annotations_skipped) tuple where data contains the keys:
        ['xmin', 'xmax', 'ymin', 'ymax', 'is_crowd', 'category_id', 'area'] and
        num_annotations_skipped is the number of skipped annotations because of the
        bbox having 0 area.
      """
  
      data = collections.defaultdict(list)
  
      num_annotations_skipped = 0
  
      for object_annotations in bbox_annotations:
          (x, y, width, height) = tuple(object_annotations["bbox"])
  
          if width <= 0 or height <= 0:
              num_annotations_skipped += 1
              continue
          if x + width > image_width or y + height > image_height:
              num_annotations_skipped += 1
              continue
          data["xmin"].append(float(x) / image_width)
          data["xmax"].append(float(x + width) / image_width)
          data["ymin"].append(float(y) / image_height)
          data["ymax"].append(float(y + height) / image_height)
          category_id = int(object_annotations["category_id"])
          data["category_id"].append(category_id)
  
      return data, num_annotations_skipped
  
imports: import abc
  import collections
  import hashlib
  import json
  import math
  import os
  import tempfile
  from typing import Any, Dict, List, Mapping, Optional
  import xml.etree.ElementTree
  import tensorflow
  from mediapipe.model_maker.python.core.data import cache_files
  from official.vision.data import tfrecord_lib
label_desc: Use image node_id 10 for calling a global function with example usage: _coco_annotations_to_lists(bbox_annotations, image_height, image_width) and returns: data,  num_annotations_skipped