code: def testGroverMTBlock(grover_batched_graph):
      from deepchem.models.torch_models.grover_layers import (
          GroverMTBlock,
      )
  
      (
          f_atoms,
          f_bonds,
          a2b,
          b2a,
          b2revb,
          a2a,
          a_scope,
          b_scope,
          _,
      ) = grover_batched_graph.get_components()
  
      hidden_size = 16
      layer = GroverMTBlock(
          atom_messages=True,
          input_dim=f_atoms.shape[1],
          num_heads=4,
          depth=1,
          hidden_size=hidden_size,
      )
  
      new_batch = layer(
          [f_atoms, f_bonds, a2b, b2a, b2revb, a_scope, b_scope, a2a]
      )
      (
          new_f_atoms,
          new_f_bonds,
          new_a2b,
          new_b2a,
          new_b2revb,
          new_a_scope,
          new_b_scope,
          new_a2a,
      ) = new_batch
      # The shapes should match the earlier shapes because message passing only updates node features.
      assert new_f_atoms.shape == (f_atoms.shape[0], hidden_size)
      assert new_f_bonds.shape == f_bonds.shape
      # The following variables are utility variables used during message passing to compute neighbors. Here we are asserting that MTBlock layer is not modifying these variables.
      assert (new_a2b == a2b).all()
      assert (new_b2a == b2a).all()
      assert (new_b2revb == b2revb).all()
      assert (new_a_scope == a_scope).all()
      assert (new_b_scope == b_scope).all()
      assert (new_a2a == a2a).all()
  
file_path: deepchem/deepchem/models/torch_models/tests/test_grover_layers.py
imports: import pytest
label_desc: Use image node_id 7 for calling a global function with example usage: testGroverMTBlock(grover_batched_graph) without return types