code: def _parse_bdd_detection(d, frame_size, extra_attrs):
      label = d["category"]
      confidence = d.get("score", None)
  
      width, height = frame_size
      box2d = d["box2d"]
      bounding_box = (
          box2d["x1"] / width,
          box2d["y1"] / height,
          (box2d["x2"] - box2d["x1"]) / width,
          (box2d["y2"] - box2d["y1"]) / height,
      )
  
      attributes = d.get("attributes", {})
      attributes = _filter_attributes(attributes, extra_attrs)
  
      return fol.Detection(
          label=label,
          bounding_box=bounding_box,
          confidence=confidence,
          **attributes,
      )
  
imports: from copy import deepcopy
  import logging
  import os
  import warnings
  import eta.core.serial
  import eta.core.utils
  import fiftyone
  import fiftyone.core.labels
  import fiftyone.core.metadata
  import fiftyone.core.storage
  import fiftyone.utils.data
label_desc: Use image node_id 9 for calling a global function with example usage: _parse_bdd_detection(d, frame_size, extra_attrs) and returns: fol