code: def covert_dataset_to_dataloader(dataset, sampler, batch_size):
      """
      Wraps a PyTorch Dataset with a DataLoader.
  
      :param dataset: Dataset to be wrapped.
      :type dataset: Dataset
      :param sampler: PyTorch sampler used to pick samples in a batch.
      :type sampler: Sampler
      :param batch_size: Number of samples in the batch.
      :return: A DataLoader that wraps the input Dataset.
      """
      sampler_initialized = sampler(dataset)
      data_loader = DataLoader(
          dataset, sampler=sampler_initialized, batch_size=batch_size
      )
      return data_loader
  
imports: from math import ceil
  from torch.utils.data import DataLoader, Dataset, Sampler
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: covert_dataset_to_dataloader(dataset, sampler, batch_size) and returns: data_loader