code: def lstsq(a, b, rcond="warn"):
      r"""
      Return the least-squares solution to a linear matrix equation.
  
      Solves the equation :math:`a x = b` by computing a vector `x` that
      minimizes the squared Euclidean 2-norm :math:`\| b - a x \|^2_2`.
      The equation may be under-, well-, or over-determined (i.e., the
      number of linearly independent rows of `a` can be less than, equal
      to, or greater than its number of linearly independent columns).
      If `a` is square and of full rank, then `x` (but for round-off error)
      is the "exact" solution of the equation.
  
      Parameters
      ----------
      a : (M, N) _Symbol
          "Coefficient" matrix.
      b : {(M,), (M, K)} _Symbol
          Ordinate or "dependent variable" values. If `b` is two-dimensional,
          the least-squares solution is calculated for each of the `K` columns
          of `b`.
      rcond : float, optional
          Cut-off ratio for small singular values of `a`.
          For the purposes of rank determination, singular values are treated
          as zero if they are smaller than `rcond` times the largest singular
          value of `a`
          The default of ``warn`` or ``-1`` will use the machine precision as
          `rcond` parameter. The default of ``None`` will use the machine
          precision times `max(M, N)` as `rcond` parameter.
  
      Returns
      -------
      x : {(N,), (N, K)} _Symbol
          Least-squares solution. If `b` is two-dimensional,
          the solutions are in the `K` columns of `x`.
      residuals : {(1,), (K,), (0,)} _Symbol
          Sums of residuals.
          Squared Euclidean 2-norm for each column in ``b - a*x``.
          If the rank of `a` is < N or M <= N, this is an empty array.
          If `b` is 1-dimensional, this is a (1,) shape array.
          Otherwise the shape is (K,).
      rank : int
          Rank of matrix `a`.
      s : (min(M, N),) _Symbol
          Singular values of `a`.
  
      Raises
      ------
      MXNetError
          If computation does not converge.
  
      Notes
      -----
      If `b` is a matrix, then all array results are returned as matrices.
      """
      new_default = False
      finfo_eps_32 = _np.finfo(_np.float32).eps
      finfo_eps_64 = _np.finfo(_np.float64).eps
      if rcond is None:
          rcond = 1
          new_default = True
      if rcond == "warn":
          rcond = -1
      x, residuals, rank, s = _npi.lstsq(
          a,
          b,
          rcond=rcond,
          finfoEps32=finfo_eps_32,
          finfoEps64=finfo_eps_64,
          new_default=new_default,
      )  # pylint: disable=line-too-long
      return (x, residuals, rank, s)
  
imports: import numpy
  from .None import _symbol
  from .None import _op
  from .None import _internal
label_desc: Use image node_id 2 for calling a global function with example usage: lstsq(a, b, rcond) and returns: x,  residuals,  rank,  s