code: def _pinv_full_rank(M):
      """Subroutine for full row or column rank matrices.
  
      For full row rank matrices, inverse of ``A * A.H`` Exists.
      For full column rank matrices, inverse of ``A.H * A`` Exists.
  
      This routine can apply for both cases by checking the shape
      and have small decision.
      """
  
      if M.is_zero_matrix:
          return M.H
  
      if M.rows >= M.cols:
          return M.H.multiply(M).inv().multiply(M.H)
      else:
          return M.H.multiply(M.multiply(M.H).inv())
  
file_path: sympy/sympy/matrices/inverse.py
imports: from sympy.polys.matrices.exceptions import DMNonInvertibleMatrixError
  from sympy.polys.domains import EX
  from .exceptions import MatrixError, NonSquareMatrixError, NonInvertibleMatrixError
  from .utilities import _iszero
label_desc: Use image node_id 1 for calling a global function with example usage: _pinv_full_rank(M) and returns: M, M, M