code: def transform_beziers_annotations(beziers, transforms):
      """
      Transform keypoint annotations of an image.
  
      Args:
          beziers (list[float]): Nx16 float in Detectron2 Dataset format.
          transforms (TransformList):
      """
      # (N*2,) -> (N, 2)
      beziers = np.asarray(beziers, dtype="float64").reshape(-1, 2)
      beziers = transforms.apply_coords(beziers).reshape(-1)
  
      # This assumes that HorizFlipTransform is the only one that does flip
      do_hflip = (
          sum(
              isinstance(t, T.HFlipTransform)
              for t in transforms.transforms
          )
          % 2
          == 1
      )
      if do_hflip:
          raise ValueError(
              "Flipping text data is not supported (also disencouraged)."
          )
  
      return beziers
  
imports: import os
  import logging
  import numpy
  from PIL import Image
  import torch
  from ..structures import BitMasks, Boxes, BoxMode, Instances, Keypoints, PolygonMasks, polygons_to_bitmask
  from ..transforms import instance_transforms
  from ..registry.catalog import MetadataCatalog
label_desc: Use image node_id 17 for calling a global function with example usage: transform_beziers_annotations(beziers, transforms) and returns: beziers