code: def execute(cls, ctx, op):
      (a,), device_id, xp = as_same_device(
          [ctx[c.key] for c in op.inputs],
          device=op.device,
          ret_extra=True,
      )
  
      with device(device_id):
          if xp is np:
              import scipy.linalg
  
              p, l, u = scipy.linalg.lu(a)
          elif is_sparse_module(xp):
              p, l, u = xp.lu(a)
          else:
              raise NotImplementedError
          pc, lc, uc = op.outputs
  
          ctx[pc.key] = p
          ctx[lc.key] = l
          ctx[uc.key] = u
  
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 5 for calling the TensorLU obj's underlying member method code with example usage: obj.execute(cls, ctx, op) without return types