code: def test_lu(self, dtype):
      a_cpu = testing.shaped_random(self.shape, numpy, dtype=dtype)
      a_gpu = cupy.asarray(a_cpu)
      result_cpu = scipy.linalg.lu(a_cpu, permute_l=self.permute_l)
      result_gpu = cupyx.scipy.linalg.lu(
          a_gpu, permute_l=self.permute_l
      )
      assert len(result_cpu) == len(result_gpu)
      if not self.permute_l:
          # check permutation matrix
          result_cpu = list(result_cpu)
          result_gpu = list(result_gpu)
          P_cpu = result_cpu.pop(0)
          P_gpu = result_gpu.pop(0)
          cupy.testing.assert_array_equal(P_gpu, P_cpu)
      cupy.testing.assert_allclose(
          result_gpu[0], result_cpu[0], atol=1e-5
      )
      cupy.testing.assert_allclose(
          result_gpu[1], result_cpu[1], atol=1e-5
      )
  
file_path: cupy/tests/cupyx_tests/scipy_tests/linalg_tests/test_decomp_lu.py
imports: import unittest
  import warnings
  import numpy
  import cupy
  from cupy import testing
  import cupyx.scipy.linalg
label_desc: Use image node_id 1 for calling the TestLU obj's underlying member method code with example usage: obj.test_lu(dtype) without return types