code: def _conv_df_to_sparse(x):
      cupy_ary = rmm_cupy_ary(
          cp.asarray, x.to_cupy(), dtype=x.dtypes[0]
      )
  
      return cupyx.scipy.sparse.csr_matrix(cupy_ary)
  
file_path: cuml/python/cuml/dask/common/dask_arr_utils.py
imports: from cuml.common import rmm_cupy_ary, has_scipy
  from cuml.dask.common.part_utils import _extract_partitions
  from dask.distributed import default_client
  from cuml.dask.common.dask_df_utils import to_dask_cudf
  from cuml.internals.memory_utils import with_cupy_rmm
  import dask.dataframe
  import dask
  from cuml.internals.safe_imports import gpu_only_import
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 2 for calling a global function with example usage: _conv_df_to_sparse(x) and returns: cupyx