code: def test_deferred_batch_norm(checkpoint, setup_rpc):
      bn = nn.BatchNorm2d(3)
      pipe_bn = deepcopy(bn)
      pipe = Pipe(
          nn.Sequential(pipe_bn),
          chunks=2,
          checkpoint=checkpoint,
          deferred_batch_norm=True,
      )
  
      x = torch.rand(4, 3, 10, 10)
      pipe(x).local_value().mean().backward()
      bn(x).mean().backward()
  
      assert torch.allclose(
          pipe[0].running_mean, bn.running_mean, atol=1e-4
      )
      assert torch.allclose(
          pipe[0].running_var, bn.running_var, atol=1e-4
      )
  
imports: from collections import OrderedDict
  from copy import deepcopy
  import time
  import pytest
  import random
  import torch
  from torch import nn
  from torch import Tensor
  from torch.distributed.pipeline.sync import Pipe, NoChunk, WithDevice
  from torch.distributed.pipeline.sync.pipe import PipeSequential
  from torch.testing._internal.common_utils import run_tests, TEST_CUDA
  from torch.testing._internal.common_cuda import TEST_MULTIGPU
label_desc: Use image node_id 27 for calling a global function with example usage: test_deferred_batch_norm(checkpoint, setup_rpc) without return types