def get_labels(
        self,
        uri,
        label_types,
        frame_size,
        seg_type,
        skeleton=None,
        skeleton_key=None,
    ):
        """Get the FiftyOne labels corresponding to the annotations of a given
        URI. The results are two dictionaries, sample- and frame-level, mapping
        field names to values and label objects.

        Args:
            uri: the unique identifier to a media file
            label_types: a list of label types to load. The
                supported values are
                ``("detections", "segmentations", "keypoints")``.
            frame_size: the (width, height) tuple for the media frame
            seg_type: the :class:`SegmentationType` to use for segmentation
                annotations
            skeleton (None): a
                :class:`fiftyone.core.odm.dataset.KeypointSkeleton` to use as a
                reference when loading keypoints
            skeleton_key (None): the name of the field in the OpenLABEL
                annotations containing the labels of keypoints matching the
                labels of the given skeleton

        Returns:
            a dictionary of sample level fields and label objects and a
            dictionary of frame numbers to frame level fields and label objects
        """
        stream_infos = self.streams.get_stream_info(uri)
        sample_objects = self.objects.get_objects(stream_infos)
        return sample_objects.to_labels(
            frame_size,
            label_types,
            seg_type,
            stream_infos,
            skeleton=skeleton,
            skeleton_key=skeleton_key,
        )
Get the FiftyOne labels corresponding to the annotations of a given
        URI. The results are two dictionaries, sample- and frame-level, mapping
        field names to values and label objects.

        Args:
            uri: the unique identifier to a media file
            label_types: a list of label types to load. The
                supported values are
                ``("detections", "segmentations", "keypoints")``.
            frame_size: the (width, height) tuple for the media frame
            seg_type: the :class:`SegmentationType` to use for segmentation
                annotations
            skeleton (None): a
                :class:`fiftyone.core.odm.dataset.KeypointSkeleton` to use as a
                reference when loading keypoints
            skeleton_key (None): the name of the field in the OpenLABEL
                annotations containing the labels of keypoints matching the
                labels of the given skeleton

        Returns:
            a dictionary of sample level fields and label objects and a
            dictionary of frame numbers to frame level fields and label objects
        
fiftyone/utils/openlabel.py