def from_doc(cls, doc, dataset=None):
        """Creates a sample backed by the given document.

        Args:
            doc: a :class:`fiftyone.core.odm.sample.DatasetSampleDocument` or
                :class:`fiftyone.core.odm.sample.NoDatasetSampleDocument`
            dataset (None): the :class:`fiftyone.core.dataset.Dataset` that
                the sample belongs to

        Returns:
            a :class:`Sample`
        """
        sample = super().from_doc(doc, dataset=dataset)

        if sample.media_type == fomm.VIDEO:
            sample._frames = fofr.Frames(sample)

        return sample
Creates a sample backed by the given document.

        Args:
            doc: a :class:`fiftyone.core.odm.sample.DatasetSampleDocument` or
                :class:`fiftyone.core.odm.sample.NoDatasetSampleDocument`
            dataset (None): the :class:`fiftyone.core.dataset.Dataset` that
                the sample belongs to

        Returns:
            a :class:`Sample`
        
fiftyone/core/sample.py