code: def load_dataset(
      self, split: str, task_cfg: FairseqDataclass = None, **kwargs
  ):
      data_path = self.cfg.data
      cfg = task_cfg or self.cfg
  
      compute_mask = cfg.precompute_mask_config is not None
      mask_args = {}
      if compute_mask:
          mask_args = cfg.precompute_mask_config
  
      self.datasets[split] = MaeImageDataset(
          root=data_path if cfg.multi_data is None else cfg.multi_data,
          split=split,
          input_size=cfg.input_size,
          local_cache_path=cfg.local_cache_path,
          key=cfg.key,
          beit_transforms=cfg.beit_transforms,
          target_transform=cfg.target_transform,
          no_transform=cfg.no_transform,
          compute_mask=compute_mask,
          dataset_type=cfg.dataset_type,
          **mask_args,
      )
  
      if cfg.subsample < 1:
          self.datasets[split] = SubsampleDataset(
              self.datasets[split],
              cfg.subsample,
              shuffle=True,
              seed=cfg.seed,
          )
  
file_path: fairseq/examples/data2vec/tasks/mae_image_pretraining.py
imports: import logging
  import sys
  from typing import Optional, List
  from dataclasses import dataclass, field
  from omegaconf import MISSING, II
  from fairseq.data import SubsampleDataset
  from fairseq.dataclass import FairseqDataclass
  from fairseq.tasks import FairseqTask, register_task
label_desc: Use image node_id 2 for calling the MaeImagePretrainingTask obj's underlying member method code with example usage: obj.load_dataset(split, task_cfg) without return types