code: def compare_batchlist_and_dataset_with_skips(
      test_fixture, batch_list, dataset, skip_indices=None
  ):
      """
      Compares a list of batches and the dataset.  If some samples were
      skipped in the iterator (i.e. if we simulated an error on that
      sample), that should be indicated in the skip_indices list
      """
      if skip_indices is None:
          skip_indices = []
      if isinstance(skip_indices, int):
          skip_indices = [skip_indices]
  
      skips = 0
      for idx, batch in enumerate(batch_list):
          while (idx + skips) in skip_indices:
              skips += 1
          dataset_batch = dataset[idx + skips]
          compare_batches(test_fixture, batch, dataset_batch)
  
imports: import os
  import unittest
  from functools import wraps
  import torch
  from classy_vision.hooks import ClassyHook
  from classy_vision.tasks import ClassyTask
  from classy_vision.trainer import ClassyTrainer
label_desc: Use image node_id 6 for calling a global function with example usage: compare_batchlist_and_dataset_with_skips(test_fixture, batch_list, dataset, skip_indices) without return types