code: def testInfoMax3DModularSaveReload():
      import torch
      from deepchem.models.torch_models.gnn3d import InfoMax3DModular
  
      data, _ = get_regression_dataset()
      model = InfoMax3DModular(
          hidden_dim=64,
          target_dim=10,
          aggregators=["sum", "mean", "max"],
          readout_aggregators=["sum", "mean"],
          scalers=["identity"],
          device=torch.device("cpu"),
          task="pretraining",
      )
  
      model.fit(data, nb_epoch=1)
      model2 = InfoMax3DModular(
          hidden_dim=64,
          target_dim=10,
          aggregators=["sum", "mean", "max"],
          readout_aggregators=["sum", "mean"],
          scalers=["identity"],
          task="pretraining",
      )
  
      model2.load_from_pretrained(model_dir=model.model_dir)
      assert model.components.keys() == model2.components.keys()
      keys_with_weights = [
          key
          for key in model.components.keys()
          if hasattr(model.components[key], "weight")
      ]
      assert all(
          compare_weights(key, model, model2)
          for key in keys_with_weights
      )
  
file_path: deepchem/deepchem/models/tests/test_gnn3d.py
imports: import os
  import pytest
label_desc: Use image node_id 7 for calling a global function with example usage: testInfoMax3DModularSaveReload() without return types