code: def row_norms(X, squared=False):
      """Row-wise (squared) Euclidean norm of X.
  
      Equivalent to np.sqrt((X * X).sum(axis=1)), but also supports sparse
      matrices and does not create an X.shape-sized temporary.
  
      Performs no input validation.
      """
      if issparse(X):
          if not isinstance(X, csr_matrix):
              X = csr_matrix(X)
          norms = csr_row_norms(X)
      else:
          norms = np.einsum("ij,ij->i", X, X)
  
      if not squared:
          np.sqrt(norms, norms)
      return norms
  
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 3 for calling a global function with example usage: row_norms(X, squared) and returns: norms