code: def test_matrix_rank(self, xp, dtype):
      a = xp.array(self.array, dtype=dtype)
      y = xp.linalg.matrix_rank(a, tol=self.tol)
      if xp is cupy:
          assert isinstance(y, cupy.ndarray)
          assert y.shape == ()
      else:
          # Note numpy returns numpy scalar or python int
          y = xp.array(y)
      return y
  
imports: import unittest
  import numpy
  import pytest
  import cupy
  from cupy import testing
  import cupyx
label_desc: Use image node_id 1 for calling the TestMatrixRank obj's underlying member method code with example usage: obj.test_matrix_rank(xp, dtype) and returns: y