class_docstr: 专门测试 set_dist_repro_dataloader 函数的类
class_docstr_tok: ["\u4e13\u95e8\u6d4b\u8bd5","set_dist_repro_dataloader","\u51fd\u6570\u7684\u7c7b"]
docstr: 测试 set_dist_repro_dataloader 参数 dataloader 已经支持断点重训时的表现
  应该返回新的 dataloader，且其余各项设置和原来相同
docstr_tok: ["\u6d4b\u8bd5","set_dist_repro_dataloader","\u53c2\u6570","dataloader","\u5df2\u7ecf\u652f\u6301\u65ad\u70b9\u91cd\u8bad\u65f6\u7684\u8868\u73b0","\u5e94\u8be5\u8fd4\u56de\u65b0\u7684","dataloader\uff0c\u4e14\u5176\u4f59\u5404\u9879\u8bbe\u7f6e\u548c\u539f\u6765\u76f8\u540c"]
code: def test_with_dataloader_reproducible_sampler(self, shuffle):
      """
      测试 set_dist_repro_dataloader 参数 dataloader 已经支持断点重训时的表现
      应该返回新的 dataloader，且其余各项设置和原来相同
      """
      batch_sampler = BatchSampler(
          dataset=self.dataset, batch_size=2, shuffle=shuffle
      )
      batch_sampler.sampler = RandomSampler(self.dataset, shuffle)
      dataloader = DataLoader(self.dataset, batch_sampler=batch_sampler)
      replaced_loader = self.driver.set_dist_repro_dataloader(
          dataloader, dist="dist", reproducible=False
      )
  
      assert not (replaced_loader is dataloader)
      assert not (
          replaced_loader.batch_sampler is dataloader.batch_sampler
      )
      assert isinstance(
          replaced_loader.batch_sampler.sampler, RandomSampler
      )
      assert not (
          replaced_loader.batch_sampler.sampler
          is dataloader.batch_sampler.sampler
      )
      assert replaced_loader.batch_sampler.batch_size == 2
      assert replaced_loader.batch_sampler.sampler.shuffle == shuffle
  
      self.check_set_dist_repro_dataloader(
          dataloader, replaced_loader, shuffle
      )
  
imports: import pytest
  from pathlib import Path
  from fastNLP.core.drivers.paddle_driver.single_device import PaddleSingleDriver
  from fastNLP.core.samplers import ReproduceBatchSampler, RandomSampler
  from tests.helpers.models.paddle_model import PaddleNormalModel_Classification_1
  from tests.helpers.datasets.paddle_data import PaddleNormalDataset, PaddleNormalXYDataset
  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_PADDLE, _NEED_IMPORT_TORCH
  from fastNLP import prepare_paddle_dataloader, BucketedBatchSampler
label_desc: Use image node_id 7 for calling the TestSetDistReproDataloader obj's underlying member method code with example usage: obj.test_with_dataloader_reproducible_sampler(shuffle) without return types