def to_label(
        self,
        label,
        attributes,
        width,
        height,
        skeleton=None,
        skeleton_key=None,
    ):
        """Convert this shape to a FiftyOne label.

        Args:
            label: the class label for this shape
            attributes: a dictionary of attributes for this shape
            width: the width of the frame in pixels
            height: the height of the frame in pixels
            skeleton (None): a
                :class:`fiftyone.core.odm.dataset.KeypointSkeleton` used to
                sort list attributes based on the labels in the skeleton. Used
                only if ``skeleton_key`` is provided
            skeleton_key (None): the string key into the attributes dictionary
                containing the label of each point, used to sort list attribute
                fields based on the labels in the skeleton. Used only if
                ``skeleton`` is provided

        Return:
            an :class:`fiftyone.core.labels.Keypoint`
        """
        rel_points = [(x / width, y / height) for x, y, in self.coords]
        _attrs = deepcopy(attributes)
        _attrs.update(self.attributes)
        if skeleton and skeleton_key and skeleton_key in _attrs:
            label_order = _attrs.pop(skeleton_key)
            rel_points, _attrs = self._sort_by_skeleton(
                rel_points, _attrs, label_order, skeleton
            )

        return fol.Keypoint(label=label, points=rel_points, **_attrs)
Convert this shape to a FiftyOne label.

        Args:
            label: the class label for this shape
            attributes: a dictionary of attributes for this shape
            width: the width of the frame in pixels
            height: the height of the frame in pixels
            skeleton (None): a
                :class:`fiftyone.core.odm.dataset.KeypointSkeleton` used to
                sort list attributes based on the labels in the skeleton. Used
                only if ``skeleton_key`` is provided
            skeleton_key (None): the string key into the attributes dictionary
                containing the label of each point, used to sort list attribute
                fields based on the labels in the skeleton. Used only if
                ``skeleton`` is provided

        Return:
            an :class:`fiftyone.core.labels.Keypoint`
        
fiftyone/utils/openlabel.py