code: def _test_wait_stream(self, source, target, cuda_sleep=None):
      with use_stream(target):
          if is_cuda(target):
              cuda_sleep(0.5)
          x = torch.ones(100, 100, device=get_device(target))
  
      wait_stream(source, target)
  
      with use_stream(source):
          assert x.sum().item() == 10000
  
imports: import pytest
  import torch
  from fairscale.nn.pipe.stream import CPUStream, current_stream, default_stream, get_device, is_cuda, new_stream, record_stream, use_device, use_stream, wait_stream
label_desc: Use image node_id 1 for calling the TestWaitStream obj's underlying member method code with example usage: obj._test_wait_stream(source, target, cuda_sleep) without return types