code: def _check_same_model_params(
      self,
      model_a: torch.nn.Module,
      model_b: torch.nn.Module,
      message: str = "",
  ) -> None:
      # Check that model parameters match
      for p_a, p_b in zip(model_a.parameters(), model_b.parameters()):
          torch.testing.assert_close(
              p_a,
              p_b,
              atol=1e-3,
              rtol=1e-5,
              msg=f"Model parameters differ:\n{p_a} {p_b}\n" + message,
          )
      # Check that model buffers match
      for b_a, b_b in zip(model_a.buffers(), model_b.buffers()):
          torch.testing.assert_close(
              b_a,
              b_b,
              msg=f"Model buffers differ:\n{b_a} {b_b}\n" + message,
          )
  
imports: import copy
  import os
  import sys
  import unittest
  from contextlib import nullcontext
  from typing import Any, cast, List
  import numpy
  import torch
  import torch.distributed
  from torch.distributed.algorithms.ddp_comm_hooks.ddp_zero_hook import hook_with_zero_step, hook_with_zero_step_interleaved
  from torch.distributed.algorithms.ddp_comm_hooks.default_hooks import allreduce_hook
  from torch.distributed.algorithms.join import Join, Joinable, JoinHook
  from torch.distributed.optim import ZeroRedundancyOptimizer
  from torch.distributed.optim.zero_redundancy_optimizer import _broadcast_object
  from torch.nn.parallel import DistributedDataParallel
  from torch.optim import AdamW, SGD
  from torch.testing._internal import common_distributed
  from torch.testing._internal.common_utils import instantiate_parametrized_tests, IS_WINDOWS, parametrize, run_tests, TEST_WITH_ASAN, TEST_WITH_DEV_DBG_ASAN
label_desc: Use image node_id 4 for calling the TestZeroRedundancyOptimizerDistributed obj's underlying member method code with example usage: obj._check_same_model_params(model_a, model_b, message) without return types