code: def test_dtnn():
      """Tests DTNN for Shape and trainable parameter count.
  
      - Used dataset files: qm9_mini.sdf, qm9_mini.sdf.csv (A subset of qm9 dataset.)
      - Tasks selected are only of regression type.
  
      """
  
      # Get Data
      model_dir = os.path.dirname(
          os.path.dirname(os.path.abspath(__file__))
      )
      dataset_file = os.path.join(
          model_dir, "tests/assets/qm9_mini.sdf"
      )
      TASKS = ["alpha", "homo"]
      loader = SDFLoader(
          tasks=TASKS, featurizer=CoulombMatrix(29), sanitize=True
      )
      data = loader.create_dataset(dataset_file, shard_size=100)
  
      inputs = batch_coulomb_matrix_features(data.X)
      (
          atom_number,
          distance,
          atom_membership,
          distance_membership_i,
          distance_membership_j,
      ) = inputs
      inputs = [
          torch.tensor(atom_number).to(torch.int64),
          torch.tensor(distance).to(torch.float32),
          torch.tensor(atom_membership).to(torch.int64),
          torch.tensor(distance_membership_i).to(torch.int64),
          torch.tensor(distance_membership_j).to(torch.int64),
      ]
      n_tasks = data.y.shape[0]
      model = DTNN(n_tasks)
  
      pred = model(inputs)
  
      # Check Shape
      assert pred.shape == (21, 21)
  
      # Check number of parameters
      assert len(list(model.parameters())) == 17
  
file_path: deepchem/deepchem/models/tests/test_dtnn.py
imports: import os
  import pytest
  import tempfile
  import numpy
  from deepchem.data import SDFLoader
  from deepchem.feat import CoulombMatrix
  from deepchem.utils import batch_coulomb_matrix_features
label_desc: Use image node_id 1 for calling a global function with example usage: test_dtnn() without return types