code: def test_multiseq_gaps(self):
      num_batches = 16
      batch_size = 10
      dataset_multiseq = MockDataset(5, max_frame_gap=3)
      for ips_options in [[10], [2], [3], [2, 3, 4]]:
          debug_info = f" Images per sequence: {ips_options}."
  
          sampler = SceneBatchSampler(
              dataset_multiseq,
              batch_size=batch_size,
              num_batches=num_batches,
              images_per_seq_options=ips_options,
              sample_consecutive_frames=True,
              consecutive_frames_max_gap=1,
          )
  
          self.assertEqual(len(sampler), num_batches, msg=debug_info)
  
          it = iter(sampler)
          for _ in range(num_batches):
              batch = next(it)
              self.assertIsNotNone(
                  batch, "batch is None in" + debug_info
              )
              if max(ips_options) > 5:
                  # true for our examples
                  self.assertEqual(len(batch), 5, msg=debug_info)
              else:
                  # true for our examples
                  self.assertEqual(
                      len(batch), batch_size, msg=debug_info
                  )
  
              self._check_frames_are_consecutive(
                  batch, dataset_multiseq.frame_annots, debug_info
              )
  
imports: import unittest
  from collections import defaultdict
  from dataclasses import dataclass
  from itertools import product
  import numpy
  import torch
  from pytorch3d.implicitron.dataset.data_loader_map_provider import DoublePoolBatchSampler
  from pytorch3d.implicitron.dataset.dataset_base import DatasetBase
  from pytorch3d.implicitron.dataset.frame_data import FrameData
  from pytorch3d.implicitron.dataset.scene_batch_sampler import SceneBatchSampler
label_desc: Use image node_id 4 for calling the TestSceneBatchSampler obj's underlying member method code with example usage: obj.test_multiseq_gaps() without return types