def to_dict(self, include_frames=False, include_private=False):
        """Serializes the sample to a JSON dictionary.

        Args:
            include_frames (False): whether to include the frame labels for
                video samples
            include_private (False): whether to include private fields

        Returns:
            a JSON dict
        """
        d = super().to_dict(include_private=include_private)

        if self.media_type == fomm.VIDEO:
            if include_frames:
                d["frames"] = self.frames._to_frames_dict(
                    include_private=include_private
                )
            else:
                d.pop("frames", None)

        return d
Serializes the sample to a JSON dictionary.

        Args:
            include_frames (False): whether to include the frame labels for
                video samples
            include_private (False): whether to include private fields

        Returns:
            a JSON dict
        
fiftyone/core/sample.py