code: def array_strategy(draw):
      n = draw(st.integers(1, 100))
      m = draw(st.integers(1, 100))
      dtype = draw(st.sampled_from([np.float64, np.float32]))
      rng = np.random.RandomState(34)
      X = rng.randn(n, m).astype(dtype)
      n_test = draw(st.integers(1, 100))
      X_test = rng.randn(n_test, m).astype(dtype)
  
      if draw(st.booleans()):
          sample_weight = None
      else:
          sample_weight = draw(
              arrays(
                  dtype=np.float64,
                  shape=n,
                  elements=st.floats(0.1, 2.0),
              )
          )
      type = draw(st.sampled_from(["numpy", "cupy", "cudf", "pandas"]))
      if type == "cupy":
          assume(n > 1 and n_test > 1)
      return as_type(type, X, X_test, sample_weight)
  
file_path: cuml/python/cuml/tests/test_kernel_density.py
imports: from cuml.testing.utils import as_type
  from sklearn.model_selection import GridSearchCV
  import pytest
  from hypothesis.extra.numpy import arrays
  from hypothesis import given, settings, assume, strategies
  from cuml.neighbors import KernelDensity, VALID_KERNELS, logsumexp_kernel
  from cuml.common.exceptions import NotFittedError
  from sklearn.metrics import pairwise_distances
  from sklearn.neighbors._ball_tree import kernel_norm
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 2 for calling a global function with example usage: array_strategy(draw) and returns: as_type