code: def ground_truth(N, C, H, W, dtype, memory_format, bottleneck):
      if memory_format == 1:
          # 1 -> explicit nhwc
          explicit_nhwc = True
          with torch.no_grad():
              x = torch.randn([N, H, W, C], dtype=dtype, device="cuda")
              torch.distributed.broadcast(x, 0)
              x, dy = clone_inputs(bottleneck, x)
          return fprop_and_bprop(bottleneck, x, dy)
      else:
          # 2 -> native nhwc
          # 3 -> nchw
          explicit_nhwc = False
          assert False, "Not implemented yet"
  
imports: import unittest
  import torch
  from torch.testing._internal import common_utils
  from apex.transformer.testing.distributed_test_base import NcclDistributedTestBase
label_desc: Use image node_id 9 for calling a global function with example usage: ground_truth(N, C, H, W, dtype, memory_format, bottleneck) and returns: fprop_and_bprop