code: def check_mode(self, array, mode, dtype):
      if runtime.is_hip and driver.get_build_version() < 307:
          if dtype in (numpy.complex64, numpy.complex128):
              pytest.skip("ungqr unsupported")
  
      a_cpu = numpy.asarray(array, dtype=dtype)
      a_gpu = cupy.asarray(array, dtype=dtype)
      result_gpu = cupy.linalg.qr(a_gpu, mode=mode)
      if (
          mode != "raw"
          or numpy.lib.NumpyVersion(numpy.__version__) >= "1.22.0rc1"
      ):
          result_cpu = numpy.linalg.qr(a_cpu, mode=mode)
          self._check_result(result_cpu, result_gpu)
  
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 1 for calling the TestQRDecomposition obj's underlying member method code with example usage: obj.check_mode(array, mode, dtype) without return types