code: def _make_sampler(
      dataset: Any,
      distributed_sampling: bool,
      data_loader_args: Dict[str, Any],
      batch_size: int,
  ):
      loader, _ = _make_data_loader(
          dataset,
          distributed_sampling,
          data_loader_args,
          batch_size,
          force_no_workers=True,
      )
  
      sampler = loader.batch_sampler
      return sampler
  
imports: from typing import Any, Dict, Iterator, List, Optional, Sequence, Sized, Union
  import numpy
  from torch.utils.data import DistributedSampler, Dataset
  from torch.utils.data.dataloader import DataLoader
  from avalanche.benchmarks.utils.data import AvalancheDataset
  from avalanche.benchmarks.utils.data_attribute import DataAttribute
  from avalanche.benchmarks.utils.ffcv_support.ffcv_components import HybridFfcvLoader, has_ffcv_support
  from avalanche.distributed.distributed_helper import DistributedHelper
  from torch.utils.data.sampler import Sampler, BatchSampler
  from torch.utils.data import ConcatDataset
label_desc: Use image node_id 5 for calling a global function with example usage: _make_sampler(dataset, distributed_sampling, data_loader_args, batch_size) and returns: sampler