code: def test_adjoining_partitions():
      p1 = nn.Sequential(StashFoo())
      p2 = nn.Sequential(PopFoo())
  
      layout = inspect_skip_layout([p1, p2])
      policy = [list(layout.copy_policy(i)) for i in range(2)]
  
      assert policy == [[], [(0, None, "foo")]]
  
imports: from torch import nn
  from torch.distributed.pipeline.sync.skip import Namespace, pop, skippable, stash
  from torch.distributed.pipeline.sync.skip.layout import inspect_skip_layout
  from torch.testing._internal.common_utils import run_tests
label_desc: Use image node_id 3 for calling a global function with example usage: test_adjoining_partitions() without return types