code: def __init__(
      self,
      dataset,
      latent_sampling_method="once",
      batch_size=1,
      pin_memory=False,
  ):
      super(PersonalizedDataLoader, self).__init__(
          dataset,
          batch_sampler=GroupedBatchSampler(dataset, batch_size),
          pin_memory=pin_memory,
      )
      if latent_sampling_method == "random":
          self.collate_fn = collate_wrapper_random
      else:
          self.collate_fn = collate_wrapper
  
imports: import os
  import numpy
  import PIL
  import torch
  from PIL import Image
  from torch.utils.data import Dataset, DataLoader, Sampler
  from torchvision import transforms
  from collections import defaultdict
  from random import shuffle, choices
  import random
  import tqdm
  from modules import devices, shared
  import re
  from ldm.modules.distributions.distributions import DiagonalGaussianDistribution
label_desc: Use image node_id 1 to create a new PersonalizedDataLoader object from inherited base classes: DataLoader with example: obj = PersonalizedDataLoader(dataset, latent_sampling_method, batch_size, pin_memory)