code: def extract_grover_attributes(molgraph: BatchGraphData):
      """Utility to extract grover attributes for grover model
  
      Parameters
      ----------
      molgraph: BatchGraphData
          A batched graph data representing a collection of molecules.
  
      Returns
      -------
      graph_attributes: Tuple
          A tuple containing atom features, bond features, atom to bond mapping, bond to atom mapping, bond to reverse bond mapping, atom to atom mapping, atom scope, bond scope, functional group labels and other additional features.
  
      Example
      -------
      >>> import deepchem as dc
      >>> from deepchem.feat.graph_data import BatchGraphData
      >>> smiles = ['CC', 'CCC', 'CC(=O)C']
      >>> featurizer = dc.feat.GroverFeaturizer(features_generator=dc.feat.CircularFingerprint())
      >>> graphs = featurizer.featurize(smiles)
      >>> molgraph = BatchGraphData(graphs)
      >>> attributes = extract_grover_attributes(molgraph)
      """
      fg_labels = getattr(molgraph, "fg_labels")
      additional_features = getattr(molgraph, "additional_features")
      f_atoms = molgraph.node_features
      f_bonds = molgraph.edge_features
      graph_index = molgraph.graph_index
      edge_index = molgraph.edge_index
  
      a_scope = _get_atom_scopes(graph_index)
      b_scope = _get_bond_scopes(edge_index, graph_index)
      b2revb = _compute_b2revb(edge_index)
  
      # computing a2b
      a2b = _get_a2b(molgraph.num_nodes, edge_index)
  
      f_atoms_tensor = torch.FloatTensor(f_atoms)
      f_bonds_tensor = torch.FloatTensor(f_bonds)
      fg_labels_tensor = torch.FloatTensor(fg_labels)
      additional_features_tensor = torch.FloatTensor(
          additional_features
      )
      a2b_tensor = torch.LongTensor(a2b)
      b2a_tensor = torch.LongTensor(molgraph.edge_index[0])
      b2revb_tensor = torch.LongTensor(b2revb)
      # only needed if using atom messages
      a2a = b2a_tensor[a2b_tensor]  # type: ignore
      a_scope_tensor = torch.LongTensor(np.asarray(a_scope))
      b_scope_tensor = torch.LongTensor(np.asarray(b_scope))
      return (
          f_atoms_tensor,
          f_bonds_tensor,
          a2b_tensor,
          b2a_tensor,
          b2revb_tensor,
          a2a,
          a_scope_tensor,
          b_scope_tensor,
          fg_labels_tensor,
          additional_features_tensor,
      )
  
file_path: deepchem/deepchem/utils/grover.py
imports: import numpy
  from typing import List, Any
  from numpy.typing import ArrayLike
  from deepchem.feat.graph_data import BatchGraphData, GraphData
  from deepchem.feat.molecule_featurizers.dmpnn_featurizer import GraphConvConstants
label_desc: Use image node_id 5 for calling a global function with example usage: extract_grover_attributes(molgraph) and returns: f_atoms_tensor,  f_bonds_tensor,  a2b_tensor,  b2a_tensor,  b2revb_tensor,  a2a,  a_scope_tensor,  b_scope_tensor,  fg_labels_tensor,  additional_features_tensor