code: def rescale_L(L, lmax=2):
      """Rescale Laplacian eigenvalues to [-1,1]"""
      M, M = L.shape
      I = scipy.sparse.identity(M, format="csr", dtype=L.dtype)
      L /= lmax * 2
      L -= I
      return L
  
file_path: dgl/examples/pytorch/model_zoo/geometric/coarsening.py
imports: import numpy
  import scipy.sparse
  import sklearn.metrics
label_desc: Use image node_id 2 for calling a global function with example usage: rescale_L(L, lmax) and returns: L