code: def __init__(
      self,
      dataset: Dataset,
      total_samples: int,
      consumed_samples: int,
      micro_batch_size: int,
      data_parallel_rank: int,
      data_parallel_size: int,
      data_sharding: bool,
      drop_last: bool = True,
      global_batch_size: Optional[int] = None,
      pad_samples_to_global_batch_size: Optional[bool] = False,
  ) -> None:
      super().__init__(
          total_samples=total_samples,
          consumed_samples=consumed_samples,
          micro_batch_size=micro_batch_size,
          data_parallel_rank=data_parallel_rank,
          data_parallel_size=data_parallel_size,
          drop_last=drop_last,
          global_batch_size=global_batch_size,
          pad_samples_to_global_batch_size=pad_samples_to_global_batch_size,
      )
      self.dataset = dataset
      self.data_sharding = data_sharding
  
file_path: NeMo/nemo/collections/vision/data/megatron/data_samplers.py
imports: from typing import Optional
  import torch
  from torch.utils.data import Dataset
  from nemo.collections.nlp.data.language_modeling.megatron.data_samplers import MegatronPretrainingRandomSampler
  from nemo.collections.vision.data.megatron.vit_dataset import RandomSeedDataset
label_desc: Use image node_id 1 to create a new MegatronVisionPretrainingRandomSampler object from inherited base classes: MegatronPretrainingRandomSampler with example: obj = MegatronVisionPretrainingRandomSampler(dataset, total_samples, consumed_samples, micro_batch_size, data_parallel_rank, data_parallel_size, data_sharding, drop_last, global_batch_size, pad_samples_to_global_batch_size)