code: def _polyline_to_bdd(polyline, frame_size, extra_attrs):
      width, height = frame_size
  
      types = polyline.get_attribute_value("types", None)
  
      attributes = _get_attributes(polyline, extra_attrs)
  
      poly2d = []
      for points in polyline.points:
          vertices = [
              (round(width * x, 1), round(height * y, 1))
              for (x, y) in points
          ]
          poly2d.append(
              {
                  "types": types,
                  "closed": polyline.closed,
                  "vertices": vertices,
              }
          )
  
      d = {
          "id": None,
          "category": polyline.label,
          "manualAttributes": True,
          "manualShape": True,
          "attributes": attributes,
          "poly2d": poly2d,
      }
  
      if polyline.confidence is not None:
          d["score"] = polyline.confidence
  
      return d
  
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 14 for calling a global function with example usage: _polyline_to_bdd(polyline, frame_size, extra_attrs) and returns: d