code: def test_megnet_reload():
      fgg = FGG(
          avg_n_nodes=10,
          n_node_features=5,
          avg_degree=4,
          n_edge_features=3,
          global_features=4,
          num_classes=3,
      )
      graphs = fgg.sample(n_graphs=10)
      test_graphs = fgg.sample(n_graphs=10)
  
      model_dir = tempfile.mkdtemp()
      model = MEGNetModel(
          n_node_features=5,
          n_edge_features=3,
          n_global_features=4,
          n_blocks=3,
          is_undirected=True,
          residual_connection=True,
          mode="classification",
          n_classes=3,
          batch_size=16,
          model_dir=model_dir,
      )
  
      model.fit(graphs, nb_epoch=10)
  
      reloaded_model = MEGNetModel(
          n_node_features=5,
          n_edge_features=3,
          n_global_features=4,
          n_blocks=3,
          is_undirected=True,
          residual_connection=True,
          mode="classification",
          n_classes=3,
          batch_size=16,
          model_dir=model_dir,
      )
      reloaded_model.restore()
      orig_predict = model.predict(test_graphs)
      reloaded_predict = reloaded_model.predict(test_graphs)
      assert np.all(orig_predict == reloaded_predict)
  
file_path: deepchem/deepchem/models/tests/test_megnet.py
imports: import pytest
  import tempfile
  import numpy
  import deepchem
  from deepchem.utils.fake_data_generator import FakeGraphGenerator
label_desc: Use image node_id 4 for calling a global function with example usage: test_megnet_reload() without return types