code: def validate_local_param_values_with_dict(model, value_dict):
      for n, lp in model.named_parameters():
          for key, expected_tensor in value_dict[n].items():
              if key == WEIGHT_KEY:
                  actual_tensor = safe_get_local_fp32_param(lp)
              else:
                  actual_tensor = safe_get_local_optimizer_state(
                      lp, key
                  )
              assert torch.equal(expected_tensor, actual_tensor)
  
imports: import pytest
  import deepspeed.comm
  import torch
  from unit.common import DistributedTest
  from unit.simple_model import random_dataloader, SimpleModel
  from unit.util import bf16_required_version_check
  import deepspeed
  from deepspeed.utils import safe_get_full_fp32_param, safe_get_full_grad, safe_get_full_optimizer_state
  from deepspeed.utils import safe_set_full_fp32_param, safe_set_full_optimizer_state
  from deepspeed.utils import safe_get_local_fp32_param, safe_get_local_grad, safe_get_local_optimizer_state
  from deepspeed.utils import safe_set_local_fp32_param, safe_set_local_optimizer_state
  from deepspeed.runtime.zero.offload_config import OffloadDeviceEnum
  from deepspeed.ops.aio import AsyncIOBuilder
label_desc: Use image node_id 9 for calling a global function with example usage: validate_local_param_values_with_dict(model, value_dict) without return types