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 参数 `reproducible` 为 True 时的表现
  当dist为字符串时，此时应该返回新的 dataloader，会替换 sampler 为 RandomSampler
docstr_tok: ["\u6d4b\u8bd5","set_dist_repro_dataloader","\u53c2\u6570","`","reproducible","`","\u4e3a","True","\u65f6\u7684\u8868\u73b0","\u5f53dist\u4e3a\u5b57\u7b26\u4e32\u65f6\uff0c\u6b64\u65f6\u5e94\u8be5\u8fd4\u56de\u65b0\u7684","dataloader\uff0c\u4f1a\u66ff\u6362","sampler","\u4e3a","RandomSampler"]
code: def test_with_reproducible_true(self, shuffle):
      """
      测试 set_dist_repro_dataloader 参数 `reproducible` 为 True 时的表现
      当dist为字符串时，此时应该返回新的 dataloader，会替换 sampler 为 RandomSampler
      """
      dataloader = DataLoader(
          self.dataset, batch_size=2, shuffle=shuffle
      )
      replaced_loader = self.driver.set_dist_repro_dataloader(
          dataloader, dist="dist", reproducible=True
      )
  
      assert not (replaced_loader is dataloader)
      assert isinstance(
          replaced_loader.batch_sampler, paddle.io.BatchSampler
      )
      assert not (
          replaced_loader.batch_sampler is dataloader.batch_sampler
      )
      assert isinstance(
          replaced_loader.batch_sampler.sampler, RandomSampler
      )
      assert replaced_loader.batch_sampler.sampler.shuffle == shuffle
      assert (
          replaced_loader.batch_sampler.batch_size
          == dataloader.batch_sampler.batch_size
      )
      assert replaced_loader.drop_last == dataloader.drop_last
  
      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 3 for calling the TestSetDistReproDataloader obj's underlying member method code with example usage: obj.test_with_reproducible_true(shuffle) without return types