code: def test_convert_to_dtype(input_type):
      rand_func = (
          cupyx.scipy.sparse if input_type == "cupy" else scipy_sparse
      )
  
      X = rand_func.random(
          100, 100, format="csr", density=0.5, dtype=cp.float64
      )
  
      X_m = SparseCumlArray(X, convert_to_dtype=cp.float32)
  
      assert X_m.dtype == cp.float32
  
      assert X_m.indptr.dtype == cp.int32
      assert X_m.indices.dtype == cp.int32
      assert X_m.data.dtype == cp.float32
  
      X_m = SparseCumlArray(X)
  
      assert X_m.dtype == X.dtype
  
file_path: cuml/python/cuml/tests/test_array_sparse.py
imports: from cuml.internals.safe_imports import gpu_only_import
  import pytest
  from cuml.internals.array import CumlArray
  from cuml.internals.array_sparse import SparseCumlArray
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 3 for calling a global function with example usage: test_convert_to_dtype(input_type) without return types