def _video_frame_count(self, video_index: int) -> int:
        """Returns the number of frames in the video with the given index."""
        if video_index < len(self.offsets) - 1:
            n_frames = self.offsets[video_index + 1] - self.offsets[video_index]
        else:
            n_frames = len(self) - self.offsets[video_index]
        return n_frames
Returns the number of frames in the video with the given index.
lightly/data/_video.py