class_docstr: Custom data loader for multiple datasets.
class_docstr_tok: ["Custom","data","loader","for","multiple","datasets","."]
code: def _get_loader(self):
      samplers = self._create_samplers(
          self.datasets,
          self.batch_sizes,
          self.distributed_sampling,
          self.loader_kwargs,
      )
  
      multi_dataset_batch_sampler = MultiDatasetSampler(
          self.datasets,
          samplers,
          termination_dataset_idx=self.termination_dataset,
          oversample_small_datasets=self.oversample_small_datasets,
          never_ending=self.never_ending,
      )
  
      if has_ffcv_support(self.datasets):
          loader = self._make_ffcv_loader(
              self.datasets,
              multi_dataset_batch_sampler,
          )
      else:
          loader = self._make_pytorch_loader(
              self.datasets,
              multi_dataset_batch_sampler,
          )
  
      return loader
  
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 3 for calling the MultiDatasetDataLoader obj's underlying member method code with example usage: obj._get_loader() and returns: loader