code: def assert_allclose(
      actual, desired, rtol=1e-05, atol=1e-05, ratio_tol=None
  ):
      if not isinstance(actual, np.ndarray):
          actual = to_output_type(actual, "numpy")
      if not isinstance(desired, np.ndarray):
          desired = to_output_type(desired, "numpy")
  
      if ratio_tol:
          assert actual.shape == desired.shape
          diff_ratio = (actual != desired).sum() / actual.size
          assert diff_ratio <= ratio_tol
      else:
          return np_assert_allclose(
              actual, desired, rtol=rtol, atol=atol
          )
  
imports: from cuml.common import input_to_cuml_array
  from scipy.sparse import coo_matrix
  from scipy.sparse import csc_matrix
  from cupyx.scipy.sparse import coo_matrix
  from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.internals.safe_imports import gpu_only_import
  from cuml.internals.safe_imports import cpu_only_import
  import pytest
  from cuml.datasets import make_classification, make_blobs
  from cuml.internals.safe_imports import cpu_only_import_from
label_desc: Use image node_id 18 for calling a global function with example usage: assert_allclose(actual, desired, rtol, atol, ratio_tol) and returns: np_assert_allclose