code: def test_infograph_pretrain_finetune(tmpdir):
      from deepchem.models.torch_models.infograph import InfoGraphModel
      import torch
  
      torch.manual_seed(123)
      np.random.seed(123)
  
      dataset, _ = get_regression_dataset()
      num_feat = 30
      edge_dim = 11
  
      pretrain_model = InfoGraphModel(
          num_feat,
          edge_dim,
          num_gc_layers=1,
          model_dir=tmpdir,
          device=torch.device("cpu"),
      )
      pretraining_loss = pretrain_model.fit(dataset, nb_epoch=1)
      assert pretraining_loss
      pretrain_model.save_checkpoint()
  
      finetune_model = InfoGraphModel(
          num_feat,
          edge_dim,
          num_gc_layers=1,
          task="regression",
          n_tasks=1,
          model_dir=tmpdir,
          device=torch.device("cpu"),
      )
      finetune_model.restore(components=["encoder"])
      finetuning_loss = finetune_model.fit(dataset, nb_epoch=1)
      assert finetuning_loss
  
imports: import os
  import pytest
  import numpy
  import deepchem
  from deepchem.feat.molecule_featurizers import MolGraphConvFeaturizer
label_desc: Use image node_id 16 for calling a global function with example usage: test_infograph_pretrain_finetune(tmpdir) without return types