def METHOD_NAME(tmpdir):
    class NonSequentialSampler(Sampler):
        def __init__(self, data_source):
            self.data_source = data_source
        def __iter__(self):
            return iter(range(len(self.data_source)))
        def __len__(self):
            return len(self.data_source)
    class TestModel(BoringModel):
        def train_dataloader(self):
            dataset = RandomDataset(32, 64)
            sampler = NonSequentialSampler(dataset)
            return torch.utils.data.DataLoader(dataset, sampler=sampler)
        def val_dataloader(self):
            dataset = RandomDataset(32, 64)
            sampler = NonSequentialSampler(dataset)
            return torch.utils.data.DataLoader(dataset, sampler=sampler)
    model = TestModel()
    trainer = Trainer(default_root_dir=tmpdir, max_epochs=1, overfit_batches=2)
    with pytest.warns(UserWarning, match="requested to overfit but enabled train dataloader shuffling"):
        trainer.fit(model)
    assert isinstance(trainer.train_dataloader.sampler, SequentialSampler)
    assert isinstance(trainer.val_dataloaders.sampler, SequentialSampler)