code: def test_parallel_randoms():
      class Dropouts(nn.Module):
          def forward(self, x):
              for _ in range(100):
                  x = F.dropout(x, p=0.001)
              return x
  
      model = nn.Sequential(Dropouts(), Dropouts())
  
      x = torch.rand(10, 10, requires_grad=True)
      model = Pipe(
          model,
          [1, 1],
          devices=["cpu", "cpu"],
          chunks=10,
          checkpoint="always",
      )
      y = model(x)
      y.norm().backward()
  
      assert y.to(torch.bool).tolist() == x.grad.to(torch.bool).tolist()
  
file_path: fairscale/tests/nn/pipe/test_bugs.py
imports: import pytest
  import torch
  from torch import nn
  import torch.nn.functional
  from fairscale.fair_dev.testing.testing import skip_if_single_gpu
  from fairscale.nn.pipe import Pipe
label_desc: Use image node_id 4 for calling a global function with example usage: test_parallel_randoms() and returns: x