code: def check_usv(self, shape, dtype):
      array = testing.shaped_random(
          shape, numpy, dtype=dtype, seed=self.seed
      )
      a_cpu = numpy.asarray(array, dtype=dtype)
      a_gpu = cupy.asarray(array, dtype=dtype)
      result_cpu = numpy.linalg.svd(
          a_cpu, full_matrices=self.full_matrices
      )
      result_gpu = cupy.linalg.svd(
          a_gpu, full_matrices=self.full_matrices
      )
      # Check if the input matrix is not broken
      cupy.testing.assert_allclose(a_gpu, a_cpu)
  
      assert len(result_gpu) == 3
      for i in range(3):
          assert result_gpu[i].shape == result_cpu[i].shape
          assert result_gpu[i].dtype == result_cpu[i].dtype
      u_cpu, s_cpu, vh_cpu = result_cpu
      u_gpu, s_gpu, vh_gpu = result_gpu
      cupy.testing.assert_allclose(s_gpu, s_cpu, rtol=1e-5, atol=1e-4)
  
      # reconstruct the matrix
      k = s_cpu.shape[-1]
      if len(shape) == 2:
          if self.full_matrices:
              a_gpu_usv = cupy.dot(u_gpu[:, :k] * s_gpu, vh_gpu[:k, :])
          else:
              a_gpu_usv = cupy.dot(u_gpu * s_gpu, vh_gpu)
      else:
          if self.full_matrices:
              a_gpu_usv = cupy.matmul(
                  u_gpu[..., :k] * s_gpu[..., None, :],
                  vh_gpu[..., :k, :],
              )
          else:
              a_gpu_usv = cupy.matmul(
                  u_gpu * s_gpu[..., None, :], vh_gpu
              )
      cupy.testing.assert_allclose(
          a_gpu, a_gpu_usv, rtol=1e-4, atol=1e-4
      )
  
      # assert unitary
      u_len = u_gpu.shape[-1]
      vh_len = vh_gpu.shape[-2]
      cupy.testing.assert_allclose(
          cupy.matmul(u_gpu.swapaxes(-1, -2).conj(), u_gpu),
          _util.stacked_identity(shape[:-2], u_len, dtype),
          atol=1e-4,
      )
      cupy.testing.assert_allclose(
          cupy.matmul(vh_gpu, vh_gpu.swapaxes(-1, -2).conj()),
          _util.stacked_identity(shape[:-2], vh_len, dtype),
          atol=1e-4,
      )
  
imports: import unittest
  import numpy
  import pytest
  import cupy
  from cupyx import cusolver
  from cupy.cuda import driver
  from cupy.cuda import runtime
  from cupy.linalg import _util
  from cupy import testing
  from cupy.testing import _condition
  import cupyx
label_desc: Use image node_id 2 for calling the TestSVD obj's underlying member method code with example usage: obj.check_usv(shape, dtype) without return types