class_docstr: Head of GNN, node prediction
class_docstr_tok: ["Head","of","GNN",",","node","prediction"]
code: def _apply_index(self, batch):
      if batch.node_label_index.shape[0] == batch.node_label.shape[0]:
          return (
              batch.node_feature[batch.node_label_index],
              batch.node_label,
          )
      else:
          return (
              batch.node_feature[batch.node_label_index],
              batch.node_label[batch.node_label_index],
          )
  
file_path: GraphGym/graphgym/contrib/network/example.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  import torch_geometric.nn
  from torch_geometric.graphgym.models import MLP
  from graphgym.config import cfg
  from graphgym.register import register_network
label_desc: Use image node_id 2 for calling the GNNNodeHead obj's underlying member method code with example usage: obj._apply_index(batch) and returns: batch,  batch, batch,  batch