code: def set_equal_weights(mdl, torch_mdl):
      from tinygrad.nn.state import get_state_dict
  
      state, torch_state = get_state_dict(mdl), torch_mdl.state_dict()
      assert len(state) == len(torch_state)
      for k, v in state.items():
          assert k in torch_state
          torch_state[k].copy_(torch.from_numpy(v.numpy()))
      torch_mdl.eval()
  
file_path: tinygrad/test/models/test_bert.py
imports: import unittest
  import numpy
  from tinygrad.tensor import Tensor
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: set_equal_weights(mdl, torch_mdl) without return types