code: def is_state_dict_equal(state0, state1):
      return all(
          torch.equal(w0.cpu(), w1.cpu())
          for w0, w1 in zip(state0.values(), state1.values())
      )
  
file_path: pytorch-lightning/tests/parity_fabric/utils.py
imports: import os
  import torch
  from lightning.fabric.accelerators.cuda import _clear_cuda_memory
label_desc: Use image node_id 1 for calling a global function with example usage: is_state_dict_equal(state0, state1) and returns: all