code: def testGroverTransEncoder(grover_batched_graph):
      from deepchem.models.torch_models.grover_layers import (
          GroverTransEncoder,
      )
  
      (
          f_atoms,
          f_bonds,
          a2b,
          b2a,
          b2revb,
          a2a,
          a_scope,
          b_scope,
          _,
      ) = grover_batched_graph.get_components()
  
      hidden_size = 8
      n_atoms, n_bonds = f_atoms.shape[0], f_bonds.shape[0]
      node_fdim, edge_fdim = f_atoms.shape[1], f_bonds.shape[1]
      layer = GroverTransEncoder(
          hidden_size=hidden_size,
          edge_fdim=edge_fdim,
          node_fdim=node_fdim,
      )
      output = layer(
          [f_atoms, f_bonds, a2b, b2a, b2revb, a_scope, b_scope, a2a]
      )
      assert output[0][0].shape == (n_atoms, hidden_size)
      assert output[0][1].shape == (n_bonds, hidden_size)
      assert output[1][0].shape == (n_atoms, hidden_size)
      assert output[1][1].shape == (n_bonds, hidden_size)
  
file_path: deepchem/deepchem/models/torch_models/tests/test_grover_layers.py
imports: import pytest
label_desc: Use image node_id 8 for calling a global function with example usage: testGroverTransEncoder(grover_batched_graph) without return types