code: def test_pagtn_regression():
      # load datasets
      featurizer = PagtnMolGraphFeaturizer(max_length=5)
      tasks, dataset, transformers, metric = get_dataset(
          "regression", featurizer=featurizer
      )
  
      # initialize models
      n_tasks = len(tasks)
      model = PagtnModel(
          mode="regression", n_tasks=n_tasks, batch_size=16
      )
  
      # overfit test
      model.fit(dataset, nb_epoch=150)
      scores = model.evaluate(dataset, [metric], transformers)
      assert scores["mean_absolute_error"] < 0.65
  
      # test on a small MoleculeNet dataset
      from deepchem.molnet import load_delaney
  
      tasks, all_dataset, transformers = load_delaney(
          featurizer=featurizer
      )
      train_set, _, _ = all_dataset
      model = PagtnModel(
          mode="regression", n_tasks=n_tasks, batch_size=16
      )
      model.fit(train_set, nb_epoch=1)
  
file_path: deepchem/deepchem/models/tests/test_pagtn.py
imports: import pytest
  import tempfile
  import numpy
  import deepchem
  from deepchem.feat import PagtnMolGraphFeaturizer
  from deepchem.models.tests.test_graph_models import get_dataset
label_desc: Use image node_id 1 for calling a global function with example usage: test_pagtn_regression() without return types