class_docstr: Implements the multi-crop transformations for SwaV.
  
  Attributes:
      crop_sizes:
          Size of the input image in pixels for each crop category.
      crop_counts:
          Number of crops for each crop category.
      crop_min_scales:
          Min scales for each crop category.
      crop_max_scales:
          Max_scales for each crop category.
      transforms:
          Transforms which are applied to all crops.
class_docstr_tok: ["Implements","the","multi-crop","transformations","for","SwaV",".","Attributes",":","crop_sizes",":","Size","of","the","input","image","in","pixels","for","each","crop","category",".","crop_counts",":","Number","of","crops","for","each","crop","category",".","crop_min_scales",":","Min","scales","for","each","crop","category",".","crop_max_scales",":","Max_scales","for","each","crop","category",".","transforms",":","Transforms","which","are","applied","to","all","crops","."]
code: def __init__(
      self,
      crop_sizes: List[int],
      crop_counts: List[int],
      crop_min_scales: List[float],
      crop_max_scales: List[float],
      transforms: T.Compose,
  ):
      if len(crop_sizes) != len(crop_counts):
          raise ValueError(
              "Length of crop_sizes and crop_counts must be equal but are"
              f" {len(crop_sizes)} and {len(crop_counts)}."
          )
      if len(crop_sizes) != len(crop_min_scales):
          raise ValueError(
              "Length of crop_sizes and crop_min_scales must be equal but are"
              f" {len(crop_sizes)} and {len(crop_min_scales)}."
          )
      if len(crop_sizes) != len(crop_min_scales):
          raise ValueError(
              "Length of crop_sizes and crop_max_scales must be equal but are"
              f" {len(crop_sizes)} and {len(crop_min_scales)}."
          )
  
      crop_transforms = []
      for i in range(len(crop_sizes)):
          random_resized_crop = T.RandomResizedCrop(
              crop_sizes[i],
              scale=(crop_min_scales[i], crop_max_scales[i]),
          )
  
          crop_transforms.extend(
              [
                  T.Compose(
                      [
                          random_resized_crop,
                          transforms,
                      ]
                  )
              ]
              * crop_counts[i]
          )
      super().__init__(crop_transforms)
  
imports: import math
  from multiprocessing import Value
  from typing import List, Optional, Tuple, Union
  from warnings import warn
  import torch
  import torch.nn
  import torchvision
  import torchvision.transforms
  from PIL import Image
  from lightly.transforms import GaussianBlur, Jigsaw, RandomSolarization
  from lightly.transforms.random_crop_and_flip_with_grid import RandomResizedCropAndFlip
  from lightly.transforms.rotation import random_rotation_transform
  from lightly.transforms.utils import IMAGENET_NORMALIZE
label_desc: Use image node_id 1 to create a new MultiCropCollateFunction object from inherited base classes: MultiViewCollateFunction with example: obj = MultiCropCollateFunction(crop_sizes, crop_counts, crop_min_scales, crop_max_scales, transforms)