code: def matrix_rank(M, tol=None, hermitian=False):
      """
      Return matrix rank of array using SVD method
  
      Rank of the array is the number of singular values of the array that are
      greater than `tol`.
  
      Parameters
      M : {(M,), (..., M, N)} _Symbol
          Input vector or stack of matrices.
      tol : (...) _Symbol, float, optional
          Threshold below which SVD values are considered zero. If `tol` is
          None, and ``S`` is an array with singular values for `M`, and
          ``eps`` is the epsilon value for datatype of ``S``, then `tol` is
          set to ``S.max() * max(M.shape) * eps``.
      hermitian : bool, optional
          If True, `M` is assumed to be Hermitian (symmetric if real-valued),
          enabling a more efficient method for finding singular values.
          Defaults to False.
  
      Returns
      -------
      rank : (...) _Symbol
          Rank of M.
      """
      finfo_eps_32 = _np.finfo(_np.float32).eps
      finfo_eps_64 = _np.finfo(_np.float64).eps
      if tol is None:
          return _npi.matrix_rank_none_tol(
              M, finfo_eps_32, finfo_eps_64, hermitian
          )
      else:
          return _npi.matrix_rank(M, tol, hermitian)
  
imports: import numpy
  from .None import _symbol
  from .None import _op
  from .None import _internal
label_desc: Use image node_id 1 for calling a global function with example usage: matrix_rank(M, tol, hermitian) and returns: _npi, _npi