code: def compute_aff(x):
      """computes the affinity matrix between an input vector and itself"""
      return torch.mm(x, x.t())
  
file_path: dgl/examples/pytorch/hilander/PSS/Smooth_AP/src/losses.py
imports: import warnings
  import faiss
  import numpy
  import torch
  from scipy import sparse
label_desc: Use image node_id 3 for calling a global function with example usage: compute_aff(x) and returns: torch