code: def dataloader_with_randomsampler(
      dataset, batch_size, shuffle, drop_last, seed=0
  ):
      """
      建立一个 sampler 为 RandomSampler 的 dataloader
      """
      dataloader = DataLoader(
          dataset,
          sampler=RandomSampler(dataset, shuffle, seed=seed),
          drop_last=drop_last,
          batch_size=batch_size,
      )
      return dataloader
  
imports: import pytest
  from pathlib import Path
  from fastNLP.core.drivers.oneflow_driver.single_device import OneflowSingleDriver
  from fastNLP.core.samplers import ReproduceBatchSampler, RandomSampler
  from tests.helpers.models.oneflow_model import OneflowNormalModel_Classification_1
  from tests.helpers.datasets.oneflow_data import OneflowNormalDataset, OneflowNormalXYDataset
  from tests.helpers.datasets.torch_data import TorchNormalDataset
  from tests.helpers.models.torch_model import TorchNormalModel_Classification_1
  from fastNLP.envs.distributed import rank_zero_rm
  from fastNLP.envs.imports import _NEED_IMPORT_ONEFLOW, _NEED_IMPORT_TORCH
  from fastNLP import prepare_oneflow_dataloader, BucketedBatchSampler
label_desc: Use image node_id 2 for calling a global function with example usage: dataloader_with_randomsampler(dataset, batch_size, shuffle, drop_last, seed) and returns: dataloader