code: def _convert_to_scipy_sparse(data, input_type):
      """Returns a tuple of arrays. Each of the arrays
      have some of its values being set randomly to 0,
      it is then converted to a scipy sparse array"""
      if data is None:
          return None
      elif isinstance(data, tuple):
          return tuple(
              [_convert_to_scipy_sparse(d, input_type) for d in data]
          )
      elif isinstance(data, np.ndarray):
          return _sparsify_and_convert(data, input_type)
      elif isinstance(data, cudf.DataFrame):
          return _sparsify_and_convert(data.to_numpy(), input_type)
      elif isinstance(data, cudf.Series):
          return _sparsify_and_convert(data.to_numpy(), input_type)
      elif isinstance(data, (pd.DataFrame, pd.Series)):
          return _sparsify_and_convert(data.to_numpy(), input_type)
      else:
          raise Exception("Unsupported type %s" % str(type(data)))
  
imports: from cuml.internals.import_utils import has_scipy
  from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.internals import input_utils
  from urllib.request import urlretrieve
  import sklearn.model_selection
  from sklearn.datasets import load_svmlight_file, fetch_covtype
  import cuml.datasets
  from cuml.internals.safe_imports import cpu_only_import
  import os
  import functools
  import gzip
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 20 for calling a global function with example usage: _convert_to_scipy_sparse(data, input_type) and returns: None, tuple, _sparsify_and_convert, _sparsify_and_convert, _sparsify_and_convert, _sparsify_and_convert