code: def lu(a):
      """
      LU decomposition
  
      The decomposition is::
          A = P L U
      where P is a permutation matrix, L lower triangular with unit diagonal elements,
      and U upper triangular.
  
      Parameters
      ----------
      a : (M, N) array_like
          Array to decompose
  
      Returns
      -------
      p : (M, M) ndarray
          Permutation matrix
      l : (M, K) ndarray
          Lower triangular or trapezoidal matrix with unit diagonal.
          K = min(M, N)
      u : (K, N) ndarray
          Upper triangular or trapezoidal matrix
  
      Examples
      --------
      >>> import mars.tensor as mt
  
      >>> A = mt.array([[1,2],[2,3]])
      >>> A.execute()
      array([[ 1,  2],
             [ 2,  3]])
      >>> P, L, U = mt.linalg.lu(A)
      >>> P.execute()
      array([[ 0,  1],
             [ 1,  0]])
      >>> L.execute()
      array([[ 1,  0],
             [ 0.5,  1]])
      >>> U.execute()
      array([[ 2,  3],
             [ 0,  0.5]])
      >>> mt.dot(P.dot(L), U).execute() # verify that PL * U = A
      array([[ 1,  2],
             [ 2,  3]])
  
      """
      op = TensorLU(sparse=a.issparse())
      return op(a)
  
file_path: mars/mars/tensor/linalg/lu.py
imports: import numpy
  from numpy.linalg import LinAlgError
  from ...None import opcodes
  from ...core import ExecutableTuple, recursive_tile
  from ...serialization.serializables import KeyField
  from ...utils import has_unknown_shape
  from ..array_utils import device, as_same_device, is_sparse_module
  from ..operands import TensorHasInput, TensorOperandMixin
  from ..datasource import tensor
label_desc: Use image node_id 1 for calling a global function with example usage: lu(a) and returns: op