code: def get_supported_input_type(X):
      """
      Determines if the input object is a supported input array-like object or
      not. If supported, the type is returned. Otherwise, `None` is returned.
  
      Parameters
      ----------
      X : object
          Input object to test
  
      Notes
      -----
      To closely match the functionality of
      :func:`~cuml.internals.input_utils.input_to_cuml_array`, this method will
      return `cupy.ndarray` for any object supporting
      `__cuda_array_interface__` and `numpy.ndarray` for any object supporting
      `__array_interface__`.
  
      Returns
      -------
      array-like type or None
          If the array-like object is supported, the type is returned.
          Otherwise, `None` is returned.
      """
      # Check CumlArray first to shorten search time
      if isinstance(X, CumlArray):
          return CumlArray
  
      if isinstance(X, SparseCumlArray):
          return SparseCumlArray
  
      if isinstance(X, CudfSeries):
          if X.null_count != 0:
              return None
          else:
              return CudfSeries
  
      if isinstance(X, PandasDataFrame):
          return PandasDataFrame
  
      if isinstance(X, PandasSeries):
          return PandasSeries
  
      if isinstance(X, CudfDataFrame):
          return CudfDataFrame
  
      try:
          if numba_cuda.devicearray.is_cuda_ndarray(X):
              return numba_cuda.devicearray.DeviceNDArrayBase
      except UnavailableError:
          pass
  
      if hasattr(X, "__cuda_array_interface__"):
          return cp.ndarray
  
      if hasattr(X, "__array_interface__"):
          # For some reason, numpy scalar types also implement
          # `__array_interface__`. See numpy.generic.__doc__. Exclude those types
          # as well as np.dtypes
          if not isinstance(X, np.generic) and not isinstance(X, type):
              return np.ndarray
  
      try:
          if cupyx.scipy.sparse.isspmatrix(X):
              return cupyx.scipy.sparse.spmatrix
      except UnavailableError:
          pass
  
      try:
          if scipy_sparse.isspmatrix(X):
              return scipy_sparse.spmatrix
      except UnavailableError:
          pass
  
      # Return None if this type is not supported
      return None
  
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 1 for calling a global function with example usage: get_supported_input_type(X) and returns: None, CumlArray, SparseCumlArray, PandasDataFrame, PandasSeries, CudfDataFrame, cp, None, CudfSeries, numba_cuda, np, cupyx, scipy_sparse