code: def input_to_host_array_with_sparse_support(X):
      _array_type, is_sparse = determine_array_type_full(X)
      if is_sparse:
          if _array_type == "cupy":
              return SparseCumlArray(X).to_output(output_type="scipy")
          elif _array_type == "cuml":
              return X.to_output(output_type="scipy")
          elif _array_type == "numpy":
              return X
          else:
              raise ValueError(
                  f"Unsupported sparse array type: {_array_type}."
              )
      return input_to_host_array(X).array
  
file_path: cuml/python/cuml/internals/input_utils.py
imports: from collections import namedtuple
  from cuml.internals.array import CumlArray
  from cuml.internals.array_sparse import SparseCumlArray
  from cuml.internals.global_settings import GlobalSettings
  from cuml.internals.mem_type import MemoryType
  from cuml.internals.safe_imports import cpu_only_import, cpu_only_import_from, gpu_only_import, gpu_only_import_from, safe_import, safe_import_from, null_decorator, return_false, UnavailableError
label_desc: Use image node_id 9 for calling a global function with example usage: input_to_host_array_with_sparse_support(X) and returns: input_to_host_array, SparseCumlArray, X, X