code: def _compare_state_dicts(state_dict_1, state_dict_2):
      if len(state_dict_1) != len(state_dict_2):
          return False
  
      for (k_1, v_1), (k_2, v_2) in zip(
          sorted(state_dict_1.items()), sorted(state_dict_2.items())
      ):
          if k_1 != k_2:
              return False
          if not torch.allclose(v_1, v_2):
              return False
      return True
  
imports: import copy
  import unittest
  from dataclasses import replace
  from unittest.mock import MagicMock
  import torch
  from pytorch_lightning.loggers import TensorBoardLogger
  from reagent.core.types import CBInput
  from reagent.evaluation.cb.policy_evaluator import PolicyEvaluator
  from reagent.evaluation.cb.utils import add_importance_weights
  from reagent.models.linear_regression import LinearRegressionUCB
label_desc: Use image node_id 1 for calling a global function with example usage: _compare_state_dicts(state_dict_1, state_dict_2) and returns: True, False, False, False