code: def encode(loader):
      model.eval()
  
      xs, ys = [], []
      for data in loader:
          data = data.to(device)
          xs.append(model(data.x, data.edge_index).cpu())
          ys.append(data.y.cpu())
      return torch.cat(xs, dim=0), torch.cat(ys, dim=0)
  
file_path: pytorch_geometric/examples/graph_sage_unsup_ppi.py
imports: import os.path
  import time
  import torch
  import torch.nn.functional
  import tqdm
  from sklearn.linear_model import SGDClassifier
  from sklearn.metrics import f1_score
  from sklearn.multioutput import MultiOutputClassifier
  from torch_geometric.data import Batch
  from torch_geometric.datasets import PPI
  from torch_geometric.loader import DataLoader, LinkNeighborLoader
  from torch_geometric.nn import GraphSAGE
label_desc: Use image node_id 2 for calling a global function with example usage: encode(loader) and returns: torch,  torch