code: def norm2(a):
      """Spectral norm ("norm 2") of a symmetric matrix `a`."""
      if COMPUTE_NORM2:
          logging.info(
              "computing spectral norm of a %s matrix", str(a.shape)
          )
          return scipy.linalg.eigvalsh(
              a
          ).max()  # much faster than np.linalg.norm(2)
      else:
          return np.nan
  
file_path: gensim/gensim/test/svd_error.py
imports: from __future__ import print_function, with_statement
  import logging
  import os
  import sys
  import time
  import bz2
  import itertools
  import numpy
  import scipy.linalg
  import gensim
label_desc: Use image node_id 1 for calling a global function with example usage: norm2(a) and returns: scipy, np