def to_labels(
        self,
        label,
        attributes,
        width,
        height,
        is_points=False,
        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
            is_points (False): whether the labels being converted are keypoints
            skeleton (None): a
                :class:`fiftyone.core.odm.dataset.KeypointSkeleton` used to
                sort list attributes based on the labels in the skeleton. Used
                only if ``is_points`` and ``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
                ``is_points`` and ``skeleton`` is provided

        Return:
            an :class:`fiftyone.core.labels.Keypoint`
        """
        if is_points:
            return self._to_point_labels(
                label,
                attributes,
                width,
                height,
                skeleton=skeleton,
                skeleton_key=skeleton_key,
            )

        return self._to_individual_labels(label, attributes, width, height)
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
            is_points (False): whether the labels being converted are keypoints
            skeleton (None): a
                :class:`fiftyone.core.odm.dataset.KeypointSkeleton` used to
                sort list attributes based on the labels in the skeleton. Used
                only if ``is_points`` and ``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
                ``is_points`` and ``skeleton`` is provided

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