code: def _parse_bdd_polylines(d, frame_size, extra_attrs):
      label = d["category"]
      confidence = d.get("score", None)
  
      attributes = d.get("attributes", {})
  
      polylines = []
      width, height = frame_size
      for poly2d in d.get("poly2d", []):
          vertices = poly2d.get("vertices", [])
          points = [(x / width, y / height) for (x, y) in vertices]
          closed = poly2d.get("closed", False)
          filled = closed  # assume that closed figures should be filled
  
          _attributes = deepcopy(attributes)
  
          if "types" in poly2d:
              _attributes["types"] = poly2d["types"]
  
          _attributes = _filter_attributes(attributes, extra_attrs)
  
          polylines.append(
              fol.Polyline(
                  label=label,
                  points=[points],
                  confidence=confidence,
                  closed=closed,
                  filled=filled,
                  **_attributes,
              )
          )
  
      return polylines
  
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 10 for calling a global function with example usage: _parse_bdd_polylines(d, frame_size, extra_attrs) and returns: polylines