docstr: Create the data loader with fixed seed.
docstr_tok: ["Create","the","data","loader","with","fixed","seed","."]
code: def create_loader(self, dataset, batch_size):
      """Create the data loader with fixed seed."""
      if self._balance:
          sampler = BalancedBatchSampler(dataset, batch_size=batch_size)
      elif self._class_weights is not None:
          sampler = ReweightedBatchSampler(
              dataset,
              batch_size=batch_size,
              class_weights=self._class_weights,
          )
      elif self._balance_domain:
          sampler = DomainBalancedBatchSampler(
              dataset, batch_size=batch_size
          )
      else:
          if len(dataset) < batch_size:
              sub_sampler = RandomSampler(
                  dataset,
                  replacement=True,
                  num_samples=batch_size,
                  generator=torch.Generator().manual_seed(self._seed),
              )
          else:
              sub_sampler = RandomSampler(
                  dataset,
                  generator=torch.Generator().manual_seed(self._seed),
              )
          sampler = BatchSampler(
              sub_sampler, batch_size=batch_size, drop_last=True
          )
      return torch.utils.data.DataLoader(
          dataset=dataset, batch_sampler=sampler
      )
  
imports: import logging
  import numpy
  import torch.utils.data
  import torchvision
  from torch.utils.data.sampler import BatchSampler, RandomSampler
label_desc: Use image node_id 2 for calling the FixedSeedSamplingConfig obj's underlying member method code with example usage: obj.create_loader(dataset, batch_size) and returns: torch