code: def test_tocupy_missing_values_handling():
      df = cudf.DataFrame(data=[[7, 2, 3], [4, 5, 6], [10, 5, 9]])
      array, n_rows, n_cols, dtype = input_to_cupy_array(
          df, fail_on_null=False
      )
      assert isinstance(array, cp.ndarray)
      assert str(array.dtype) == "int64"
  
      df = cudf.DataFrame(data=[[7, 2, 3], [4, None, 6], [10, 5, 9]])
      array, n_rows, n_cols, dtype = input_to_cupy_array(
          df, fail_on_null=False
      )
      assert isinstance(array, cp.ndarray)
      assert str(array.dtype) == "float64"
      assert cp.isnan(array[1, 1])
  
      df = cudf.Series(data=[7, None, 3])
      array, n_rows, n_cols, dtype = input_to_cupy_array(
          df, fail_on_null=False
      )
      assert str(array.dtype) == "float64"
      assert cp.isnan(array[1])
  
      with pytest.raises(ValueError):
          df = cudf.Series(data=[7, None, 3])
          array, n_rows, n_cols, dtype = input_to_cupy_array(
              df, fail_on_null=True
          )
  
imports: from pandas import Series
  from cuml.internals.safe_imports import cpu_only_import_from
  from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.internals.input_utils import convert_dtype
  from cuml.common import has_cupy
  from cuml.internals.input_utils import input_to_cupy_array
  from cuml.common import input_to_host_array
  from cuml.common import input_to_cuml_array, CumlArray
  from cuml.internals.safe_imports import cpu_only_import
  import pytest
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 13 for calling a global function with example usage: test_tocupy_missing_values_handling() without return types