code: def _inv_LU(M, iszerofunc=_iszero):
      """Calculates the inverse using LU decomposition.
  
      See Also
      ========
  
      inv
      inverse_ADJ
      inverse_GE
      inverse_CH
      inverse_LDL
      """
  
      if not M.is_square:
          raise NonSquareMatrixError(
              "A Matrix must be square to invert."
          )
      if M.free_symbols:
          _verify_invertible(M, iszerofunc=iszerofunc)
  
      return M.LUsolve(M.eye(M.rows), iszerofunc=_iszero)
  
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 8 for calling a global function with example usage: _inv_LU(M, iszerofunc) and returns: M