code: def cosine_similarity(X, Y):
      K = 1.0 - cp.asarray(pairwise_distances(X, Y, metric="cosine"))
      return cp.nan_to_num(K, copy=False)
  
file_path: cuml/python/cuml/metrics/pairwise_kernels.py
imports: from cuml.internals.input_utils import input_to_cupy_array
  from cuml.metrics import pairwise_distances
  import cuml.internals
  from cuml.internals.safe_imports import cpu_only_import
  from cuml.internals.safe_imports import gpu_only_import
  import inspect
  from cuml.internals.safe_imports import gpu_only_import_from
label_desc: Use image node_id 6 for calling a global function with example usage: cosine_similarity(X, Y) and returns: cp