code: def test_load_pretrained_subclassed_model(self):
      from rdkit import Chem
  
      bi_tasks = ["a", "b"]
      y = np.ones((3, 2))
      smiles = ["C", "CC", "CCC"]
      mols = [Chem.MolFromSmiles(smile) for smile in smiles]
      featurizer = dc.feat.ConvMolFeaturizer()
      X = featurizer.featurize(mols)
      dataset = dc.data.NumpyDataset(X, y, ids=smiles)
  
      source_model = dc.models.GraphConvModel(
          n_tasks=len(bi_tasks),
          graph_conv_layers=[128, 128],
          dense_layer_size=512,
          dropout=0,
          mode="regression",
          learning_rate=0.001,
          batch_size=8,
          model_dir="model",
      )
      source_model.fit(dataset)
  
      dest_model = dc.models.GraphConvModel(
          n_tasks=len(bi_tasks),
          graph_conv_layers=[128, 128],
          dense_layer_size=512,
          dropout=0,
          mode="regression",
          learning_rate=0.001,
          batch_size=8,
      )
  
      X_b, y_b, w_b, ids_b = next(
          dataset.iterbatches(
              batch_size=8, deterministic=True, pad_batches=True
          )
      )
      multiConvMol = ConvMol.agglomerate_mols(X_b)
      n_samples = np.array(X_b.shape[0])
      inputs = [
          multiConvMol.get_atom_features(),
          multiConvMol.deg_slice,
          np.array(multiConvMol.membership),
          n_samples,
      ]
      for i in range(1, len(multiConvMol.get_deg_adjacency_lists())):
          inputs.append(multiConvMol.get_deg_adjacency_lists()[i])
  
      dest_model.load_from_pretrained(
          source_model=source_model,
          assignment_map=None,
          value_map=None,
          include_top=False,
          inputs=inputs,
      )
  
      source_vars = source_model.model.trainable_variables[:-2]
      dest_vars = dest_model.model.trainable_variables[:-2]
      assert len(source_vars) == len(dest_vars)
  
      for source_var, dest_var in zip(*(source_vars, dest_vars)):
          source_val = source_var.numpy()
          dest_val = dest_var.numpy()
          np.testing.assert_array_almost_equal(source_val, dest_val)
  
file_path: deepchem/deepchem/models/tests/test_pretrained_keras.py
imports: import unittest
  import pytest
  import deepchem
  import numpy
  from deepchem.feat.mol_graphs import ConvMol
label_desc: Use image node_id 3 for calling the TestPretrained obj's underlying member method code with example usage: obj.test_load_pretrained_subclassed_model() without return types