code: def test(loader):
      model.eval()
      preds, targets = [], []
      for batch in loader:
          batch = batch.to(device)
          pred = model(
              batch.x_dict,
              batch.edge_index_dict,
              batch["user", "movie"].edge_label_index,
          ).clamp(min=0, max=5)
          preds.append(pred)
          targets.append(batch["user", "movie"].edge_label.float())
  
      pred = torch.cat(preds, dim=0)
      target = torch.cat(targets, dim=0)
      rmse = (pred - target).pow(2).mean().sqrt()
      return float(rmse)
  
imports: import os.path
  import torch
  import torch.nn.functional
  from torch.nn import Linear
  import torch_geometric.transforms
  from torch_geometric.datasets import MovieLens
  from torch_geometric.loader import LinkNeighborLoader
  from torch_geometric.nn import SAGEConv, to_hetero
label_desc: Use image node_id 2 for calling a global function with example usage: test(loader) and returns: float