code: def test_join_when_fork_not_requires_grad():
      x = torch.rand(2, 1)
      a, b = x.chunk(2)
  
      assert not a.requires_grad
      a, p = fork(a)
      assert not a.requires_grad
      assert not p.requires_grad
  
      assert not b.requires_grad
      b = join(b, p)
      assert not b.requires_grad
  
file_path: pytorch/test/distributed/pipeline/sync/test_dependency.py
imports: import weakref
  import pytest
  import torch
  from torch.distributed.pipeline.sync.dependency import Fork, Join, fork, join
  from torch.testing._internal.common_utils import run_tests
label_desc: Use image node_id 5 for calling a global function with example usage: test_join_when_fork_not_requires_grad() without return types