code: def test_mat_regression():
      # load datasets
      task, datasets, trans = dc.molnet.load_freesolv()
      train, valid, test = datasets
  
      # initialize model
      model = dc.models.torch_models.MATModel(
          n_encoders=2,
          sa_hsize=128,
          d_input=128,
          d_hidden=128,
          d_output=128,
          encoder_hsize=128,
          embed_input_hsize=36,
          gen_attn_hidden=32,
      )
      # overfit test
      model.fit(valid, nb_epoch=100)
      metric = dc.metrics.Metric(
          dc.metrics.mean_absolute_error, mode="regression"
      )
      scores = model.evaluate(valid, [metric], trans)
      assert scores["mean_absolute_error"] < 1.0
  
imports: import pytest
  import tempfile
  import numpy
  import deepchem
label_desc: Use image node_id 1 for calling a global function with example usage: test_mat_regression() without return types