code: def check_x(self, a_shape, rcond, dtype):
      a_gpu = testing.shaped_random(a_shape, dtype=dtype)
      a_cpu = cupy.asnumpy(a_gpu)
      a_gpu_copy = a_gpu.copy()
      if not isinstance(rcond, float):
          rcond = numpy.asarray(rcond)
      result_cpu = numpy.linalg.pinv(a_cpu, rcond=rcond)
      if not isinstance(rcond, float):
          rcond = cupy.asarray(rcond)
      result_gpu = cupy.linalg.pinv(a_gpu, rcond=rcond)
  
      assert result_cpu.dtype == result_gpu.dtype
      cupy.testing.assert_allclose(result_cpu, result_gpu, atol=1e-3)
      cupy.testing.assert_array_equal(a_gpu_copy, a_gpu)
  
imports: import unittest
  import numpy
  import pytest
  import cupy
  from cupy import testing
  from cupy.testing import _condition
  import cupyx
  from cupy.cublas import get_batched_gesv_limit, set_batched_gesv_limit
label_desc: Use image node_id 1 for calling the TestPinv obj's underlying member method code with example usage: obj.check_x(a_shape, rcond, dtype) without return types