code: def test_cgcnn_classification():
      # load datasets
      current_dir = path.dirname(path.abspath(__file__))
      config = {
          "reload": False,
          "featurizer": CGCNNFeaturizer(),
          # disable transformer
          "transformers": [],
          "data_dir": path.join(current_dir, "assets"),
      }
      tasks, datasets, transformers = load_mp_metallicity(**config)
      train, valid, test = datasets
  
      n_tasks = len(tasks)
      n_classes = 2
      model = CGCNNModel(
          n_tasks=n_tasks,
          n_classes=n_classes,
          mode="classification",
          batch_size=4,
          learning_rate=0.001,
      )
  
      # check train
      model.fit(train, nb_epoch=20)
  
      # check predict shape
      valid_preds = model.predict_on_batch(valid.X)
      assert valid_preds.shape == (2, n_classes)
      test_preds = model.predict(test)
      assert test_preds.shape == (3, n_classes)
  
      # check overfit
      classification_metric = Metric(roc_auc_score, n_tasks=n_tasks)
      scores = model.evaluate(
          train,
          [classification_metric],
          transformers,
          n_classes=n_classes,
      )
      assert scores[classification_metric.name] > 0.8
  
      if path.exists(path.join(current_dir, "mp_is_metal.json")):
          remove(path.join(current_dir, "mp_is_metal.json"))
  
file_path: deepchem/deepchem/models/tests/test_cgcnn.py
imports: import pytest
  import tempfile
  from os import path, remove
  import numpy
  from deepchem.feat import CGCNNFeaturizer
  from deepchem.molnet import load_perovskite, load_mp_metallicity
  from deepchem.metrics import Metric, mae_score, roc_auc_score
label_desc: Use image node_id 2 for calling a global function with example usage: test_cgcnn_classification() without return types