code: def test(loader):
      mse = []
      for data in loader:
          data = data.to(device)
          out = model(
              data.x, data.edge_index, data.edge_attr, data.batch
          )
          mse.append(F.mse_loss(out, data.y, reduction="none").cpu())
      return float(torch.cat(mse, dim=0).mean().sqrt())
  
file_path: pytorch_geometric/examples/attentive_fp.py
imports: import os.path
  from math import sqrt
  import torch
  import torch.nn.functional
  from rdkit import Chem
  from torch_geometric.datasets import MoleculeNet
  from torch_geometric.loader import DataLoader
  from torch_geometric.nn.models import AttentiveFP
label_desc: Use image node_id 2 for calling a global function with example usage: test(loader) and returns: float