class_docstr: Tests parameter flattening and shard metadata logic.
code: def _test_pnorm_after_step_with_shared_params(self, half: bool):
      module = self._get_shared_params_transformer().to(self.rank)
      if half:
          module = module.half()
      ref_pnorm_after_step = self._get_pnorm_after_step(module)
      module = self._get_shared_params_transformer().to(
          self.rank
      )  # recreate
      if half:
          module = module.half()
      fsdp_module = FSDP(module)
      fsdp_pnorm_after_step = self._get_pnorm_after_step(fsdp_module)
      self.assertEqual(ref_pnorm_after_step, fsdp_pnorm_after_step)
  
imports: import sys
  import torch
  import torch.nn
  from torch import distributed
  from torch.distributed.fsdp import FullyShardedDataParallel
  from torch.distributed.fsdp._flat_param import FlatParamHandle, FlatParamShardMetadata, HandleShardingStrategy
  from torch.testing._internal.common_distributed import skip_if_lt_x_gpu
  from torch.testing._internal.common_fsdp import FSDPTest
  from torch.testing._internal.common_utils import run_tests, TEST_WITH_DEV_DBG_ASAN
label_desc: Use image node_id 23 for calling the TestFlattenParams obj's underlying member method code with example usage: obj._test_pnorm_after_step_with_shared_params(half) without return types