code: def load_dataset(
      self, split: str, task_cfg: FairseqDataclass = None, **kwargs
  ):
      data_path = self.cfg.data
      cfg = task_cfg or self.cfg
  
      path_with_split = osp.join(data_path, split)
      if osp.exists(path_with_split):
          data_path = path_with_split
  
      transform = transforms.Compose(
          [
              transforms.ColorJitter(0.4, 0.4, 0.4),
              transforms.RandomHorizontalFlip(p=0.5),
              transforms.RandomResizedCrop(
                  size=cfg.input_size,
                  interpolation=transforms.InterpolationMode.BICUBIC,
              ),
              transforms.ToTensor(),
              transforms.Normalize(
                  mean=torch.tensor(cfg.normalization_mean),
                  std=torch.tensor(cfg.normalization_std),
              ),
          ]
      )
  
      logger.info(transform)
  
      self.datasets[split] = ImageDataset(
          root=data_path,
          extensions=IMG_EXTENSIONS,
          load_classes=False,
          transform=transform,
      )
  
file_path: fairseq/examples/data2vec/tasks/image_pretraining.py
imports: import logging
  import sys
  import os.path
  from dataclasses import dataclass, field
  from typing import List
  from omegaconf import MISSING
  import torch
  from torchvision import transforms
  from fairseq.dataclass import FairseqDataclass
  from fairseq.tasks import FairseqTask, register_task
label_desc: Use image node_id 2 for calling the ImagePretrainingTask obj's underlying member method code with example usage: obj.load_dataset(split, task_cfg) without return types