code: def test_cov(nrows, ncols, sparse, dtype):
      if sparse:
          x = cupyx.scipy.sparse.random(
              nrows, ncols, density=0.07, format="csr", dtype=dtype
          )
      else:
          x = cp.random.random((nrows, ncols), dtype=dtype)
  
      cov_result = cov(x, x)
  
      assert cov_result.shape == (ncols, ncols)
  
      if sparse:
          x = x.todense()
      local_cov = cp.cov(x, rowvar=False, ddof=0)
  
      assert array_equal(cov_result, local_cov, 1e-6, with_sign=True)
  
imports: from cuml.testing.utils import array_equal
  from cuml.prims.stats import cov
  from cuml.prims.stats.covariance import _cov_sparse
  import pytest
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 1 for calling a global function with example usage: test_cov(nrows, ncols, sparse, dtype) without return types