code: def _test_video_dataset_non_increasing_timestamps(self):
      self.create_dataset(n_videos=2, n_frames_per_video=5)
  
      # overwrite the _make_dataset function to return a wrong timestamp
      def _make_dataset_with_non_increasing_timestamps(*args, **kwargs):
          video_instances, timestamps, offsets, fpss = _make_dataset(
              *args, **kwargs
          )
          # set timestamp of 4th frame in 1st video to timestamp of 2nd frame.
          timestamps[0][3] = timestamps[0][1]
          return video_instances, timestamps, offsets, fpss
  
      with mock.patch(
          "lightly.data._video._make_dataset",
          _make_dataset_with_non_increasing_timestamps,
      ):
          # getting frame at wrong timestamp should throw an exception
          dataset = VideoDataset(
              self.input_dir, extensions=self.extensions
          )
          for i in range(len(dataset)):
              if i == 3:
                  # frame with wrong timestamp
                  with self.assertRaises(NonIncreasingTimestampError):
                      dataset[i]
              else:
                  dataset[i]
  
          # Getting frame at wrong timestamp should throw an exception
          # from dataloader but not break the dataloader itself. Future
          # calls to next() should still work.
          dataloader = torch.utils.data.DataLoader(
              dataset,
              num_workers=2,
              batch_size=None,
              collate_fn=lambda x: x,
          )
          dataloader_iter = iter(dataloader)
          for i in range(len(dataset)):
              if i == 3:
                  # frame with wrong timestamp
                  with self.assertRaises(NonIncreasingTimestampError):
                      next(dataloader_iter)
              else:
                  next(dataloader_iter)
  
          # disable exception, should be able to load all frames
          dataset.exception_on_non_increasing_timestamp = False
          total_frames = 0
          for _ in dataset:
              total_frames += 1
          self.assertEqual(total_frames, len(dataset))
  
imports: import contextlib
  import io
  import os
  import shutil
  import tempfile
  import unittest
  from fractions import Fraction
  from typing import List
  from unittest import mock
  import cv2
  import numpy
  import PIL
  import torch
  import torchvision
  from lightly.data import LightlyDataset, NonIncreasingTimestampError
  from lightly.data._video import VideoDataset, _find_non_increasing_timestamps, _make_dataset
label_desc: Use image node_id 14 for calling the TestVideoDataset obj's underlying member method code with example usage: obj._test_video_dataset_non_increasing_timestamps() and returns: video_instances,  timestamps,  offsets,  fpss