code: def generate_collate_function_with_leakage(collate_fn, mod):
      def collate_function_with_leakage(batch):
          """Create function which inverse the data normalization."""
          batch_dict = collate_fn(batch)
          images = batch_dict["images"]
          labels = batch_dict["labels"]
          # add some label/index correlation
          for i, label in enumerate(labels):
              if i % mod != 0:
                  images[i] = (
                      np.ones(images[i].shape)
                      * int(i % 3 + 1)
                      * int(label)
                  )
  
          batch_dict["images"] = images
          return batch_dict
  
      return collate_function_with_leakage
  
imports: import numpy
  from deepchecks.vision.checks import PropertyLabelCorrelationChange
  from deepchecks.vision.datasets.classification.mnist_torch import load_dataset
  from deepchecks.vision.datasets.detection.coco_torch import load_dataset
label_desc: Use image node_id 1 for calling a global function with example usage: generate_collate_function_with_leakage(collate_fn, mod) and returns: collate_function_with_leakage, batch_dict