code: def test_grover_finetune_regression(grover_batched_graph):
      import torch.nn as nn
      from deepchem.models.torch_models.grover_layers import (
          GroverEmbedding,
      )
      from deepchem.models.torch_models.readout import GroverReadout
      from deepchem.models.torch_models.grover import GroverFinetune
  
      (
          f_atoms,
          f_bonds,
          a2b,
          b2a,
          b2revb,
          a2a,
          a_scope,
          b_scope,
          fg_labels,
      ) = grover_batched_graph.get_components()
      additional_features = grover_batched_graph.additional_features
      inputs = f_atoms, f_bonds, a2b, b2a, b2revb, a_scope, b_scope, a2a
      components = {}
      components["embedding"] = GroverEmbedding(
          node_fdim=f_atoms.shape[1], edge_fdim=f_bonds.shape[1]
      )
      components["readout"] = GroverReadout(
          rtype="mean", in_features=128
      )
      components["mol_atom_from_atom_ffn"] = nn.Linear(
          in_features=additional_features.shape[1] + 128,
          out_features=128,
      )
      components["mol_atom_from_bond_ffn"] = nn.Linear(
          in_features=additional_features.shape[1] + 128,
          out_features=128,
      )
      model = GroverFinetune(
          **components, mode="regression", hidden_size=128
      )
      model.training = False
      output = model((inputs, additional_features))
      assert output.shape == (3, 1)
  
file_path: deepchem/deepchem/models/torch_models/tests/test_grover.py
imports: import os
  import pytest
  import numpy
  import deepchem
label_desc: Use image node_id 4 for calling a global function with example usage: test_grover_finetune_regression(grover_batched_graph) without return types