code: def norm(x):
      """Compute the Euclidean or Frobenius norm of x.
  
      Returns the Euclidean norm when x is a vector, the Frobenius norm when x
      is a matrix (2-d array). More precise than sqrt(squared_norm(x)).
      """
      x = np.asarray(x)
      (nrm2,) = linalg.get_blas_funcs(["nrm2"], [x])
      return nrm2(x)
  
imports: from __future__ import division
  from functools import partial
  import warnings
  import numpy
  from scipy import linalg
  from scipy.sparse import issparse, csr_matrix
  from .None import check_random_state
  from .fixes import np_version
  from ._logistic_sigmoid import _log_logistic_sigmoid
  from ..externals.six.moves import xrange
  from .sparsefuncs_fast import csr_row_norms
  from .validation import check_array
  from ..exceptions import NonBLASDotWarning
label_desc: Use image node_id 1 for calling a global function with example usage: norm(x) and returns: nrm2