code: def compare_weights(key, model1, model2):
      import torch
  
      return torch.all(
          torch.eq(
              model1.components[key].weight,
              model2.components[key].weight,
          )
      ).item()
  
file_path: deepchem/deepchem/models/tests/test_gnn3d.py
imports: import os
  import pytest
label_desc: Use image node_id 5 for calling a global function with example usage: compare_weights(key, model1, model2) and returns: torch