code: def test_pairwise_kernels(kernel_arg, XY):
      X, Y = XY
      kernel, args = kernel_arg
  
      if kernel == "cosine":
          # this kernel is very unstable for both sklearn/cuml
          assume(as_type("numpy", X).min() > 0.1)
          if Y is not None:
              assume(as_type("numpy", Y).min() > 0.1)
  
      K = pairwise_kernels(X, Y, metric=kernel, **args)
      skl_kernel = (
          kernel.py_func if hasattr(kernel, "py_func") else kernel
      )
      K_sklearn = skl_pairwise_kernels(
          *as_type("numpy", X, Y), metric=skl_kernel, **args
      )
      assert np.allclose(
          as_type("numpy", K), K_sklearn, atol=0.01, rtol=0.01
      )
  
imports: from cuml.testing.utils import as_type
  from hypothesis.extra.numpy import arrays
  from hypothesis import given, settings, assume, strategies
  from sklearn.kernel_ridge import KernelRidge
  import inspect
  import math
  import pytest
  from sklearn.metrics.pairwise import pairwise_kernels
  from cuml.metrics import pairwise_kernels, PAIRWISE_KERNEL_FUNCTIONS
  from cuml import KernelRidge
  from cuml.internals.safe_imports import cpu_only_import
  from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 6 for calling a global function with example usage: test_pairwise_kernels(kernel_arg, XY) without return types