code: def test_batch_non_atomic():
      x, y = torch.tensor(42), torch.tensor(21)
      b = Batch((x, y))
  
      assert not b.atomic
  
      with pytest.raises(AttributeError):
          b.tensor
  
      assert list(b) == [x, y]
      assert len(b) == 2
      assert b[0] is x
      assert b[1] is y
  
file_path: pytorch/test/distributed/pipeline/sync/test_microbatch.py
imports: import pytest
  import torch
  import torch.cuda
  from torch.distributed.pipeline.sync.microbatch import Batch, check, gather, scatter
  from torch.testing._internal.common_utils import run_tests
label_desc: Use image node_id 2 for calling a global function with example usage: test_batch_non_atomic() without return types