code: def rescale_laplacian(laplacian):
      """
      Scale graph Laplacian by the largest eigenvalue of normalized graph Laplacian,
      so that the eigenvalues of the scaled Laplacian are <= 1.
  
      Args:
          laplacian: Laplacian matrix of the graph
  
      Returns:
          Return a scaled Laplacian matrix.
      """
  
      try:
          print(
              "Calculating largest eigenvalue of normalized graph Laplacian..."
          )
          largest_eigval = eigsh(
              laplacian, 1, which="LM", return_eigenvectors=False
          )[0]
      except ArpackNoConvergence:
          warnings.warn(
              "Eigenvalue calculation did not converge! Using largest_eigval=2 instead.",
              RuntimeWarning,
              stacklevel=2,
          )
          largest_eigval = 2
  
      scaled_laplacian = (2.0 / largest_eigval) * laplacian - sp.eye(
          laplacian.shape[0]
      )
      return scaled_laplacian
  
file_path: stellargraph/stellargraph/core/utils.py
imports: import collections
  import scipy.sparse
  from scipy.sparse.linalg import ArpackNoConvergence, eigsh
  import numpy
label_desc: Use image node_id 8 for calling a global function with example usage: rescale_laplacian(laplacian) and returns: scaled_laplacian