code: def print_sampler_config(data_sampler):
      """
      Print the data sampler config to facilitate debugging. Printed params include:
          num_replicas,
          rank
          epoch
          num_samples
          total_size
          shuffle
      """
  
      if (
          getattr(data_sampler, "print_sampler_config", None)
          is not None
      ):
          data_sampler.print_sampler_config()
          return
  
      if not isinstance(
          data_sampler, torch.utils.data.DistributedSampler
      ):
          return
  
      sampler_cfg = {
          "num_replicas": data_sampler.num_replicas,
          "rank": data_sampler.rank,
          "epoch": data_sampler.epoch,
          "num_samples": data_sampler.num_samples,
          "total_size": data_sampler.total_size,
          "shuffle": data_sampler.shuffle,
      }
      if hasattr(data_sampler, "start_iter"):
          sampler_cfg["start_iter"] = data_sampler.start_iter
      if hasattr(data_sampler, "batch_size"):
          sampler_cfg["batch_size"] = data_sampler.batch_size
      if hasattr(data_sampler, "seed"):
          sampler_cfg["seed"] = data_sampler.seed
      logging.info(
          "Distributed Sampler config:\n{}".format(sampler_cfg)
      )
  
imports: import logging
  import random
  import numpy
  import torch
  import torch.distributed
  from classy_vision.dataset import DataloaderAsyncGPUWrapper
  from torch.utils.data import DataLoader
  from vissl.data.airstore_dataset import AirstoreDataset
  from vissl.data.collators import get_collator
  from vissl.data.data_helper import ClassPowerlawSampler, DeterministicDistributedSampler, StatefulDistributedSampler, StratifiedClassSampler
  from vissl.data.dataloader_sync_gpu_wrapper import DataloaderSyncGPUWrapper
  from vissl.data.dataset_catalog import get_data_files, register_datasets, VisslDatasetCatalog
  from vissl.data.disk_dataset import DiskImageDataset
  from vissl.data.ssl_dataset import GenericSSLDataset
  from vissl.data.synthetic_dataset import SyntheticImageDataset
  from vissl.data.torchvision_dataset import TorchvisionDataset
  from vissl.utils.misc import set_dataloader_seeds, setup_multiprocessing_method
label_desc: Use image node_id 2 for calling a global function with example usage: print_sampler_config(data_sampler) without return types