code: def check_param(model: GeminiDDP, torch_model: torch.nn.Module):
      zero_dict = model.state_dict(only_rank_0=False)
      torch_dict = torch_model.state_dict()
  
      for key, value in torch_dict.items():
          # key is 'module.model.PARAMETER', so we truncate it
          key = key[7:]
          assert key in zero_dict, "{} not in ZeRO dictionary.".format(
              key
          )
          temp_zero_value = zero_dict[key].to(
              device=value.device, dtype=value.dtype
          )
          # debug_print([0], "max range: ", key, torch.max(torch.abs(value - temp_zero_value)))
          assert_close(value, temp_zero_value, rtol=1e-3, atol=4e-3)
  
file_path: colossalai/tests/test_zero/test_gemini/test_grad_clip.py
imports: import pytest
  import torch
  import torch.distributed
  from torch.nn.parallel import DistributedDataParallel
  from torch.testing import assert_close
  import colossalai
  from colossalai.legacy.amp import convert_to_apex_amp
  from colossalai.nn.optimizer import HybridAdam
  from colossalai.testing import DummyDataloader, parameterize, rerun_if_address_is_in_use, spawn
  from colossalai.utils import set_seed
  from colossalai.zero import GeminiDDP, GeminiOptimizer
  from colossalai.zero.gemini.chunk import search_chunk_configuration
  from tests.kit.model_zoo import model_zoo, run_fwd_bwd
label_desc: Use image node_id 1 for calling a global function with example usage: check_param(model, torch_model) without return types