code: def _get_datatype_from_inputs(data):
      """
      Gets the datatype from a distributed data input.
  
      Parameters
      ----------
  
      data : dask.DataFrame, dask.Series, dask.Array, or
             Iterable containing either.
  
      Returns
      -------
  
      datatype : str {'cupy', 'cudf}
      """
  
      multiple = isinstance(data, Sequence)
  
      if isinstance(
          first(data) if multiple else data,
          (daskSeries, daskDataFrame, dcDataFrame, dcSeries),
      ):
          datatype = "cudf"
      else:
          datatype = "cupy"
          if multiple:
              for d in data:
                  validate_dask_array(d)
          else:
              validate_dask_array(data)
  
      return datatype, multiple
  
imports: import dask.dataframe
  from functools import reduce
  from toolz import first
  from dask.distributed import default_client
  from dask.distributed import wait
  from cuml.dask.common.part_utils import _extract_partitions
  from cuml.dask.common.dask_arr_utils import validate_dask_array
  from cuml.dask.common.dask_df_utils import to_dask_cudf
  from cuml.dask.common.utils import get_client
  from dask_cudf.core import Series
  from dask.dataframe import Series
  from dask.dataframe import DataFrame
  from cudf import Series
  from cuml.internals.safe_imports import gpu_only_import_from
  from collections import OrderedDict
  from cuml.internals.memory_utils import with_cupy_rmm
  from collections.abc import Sequence
  import dask.array
  from cuml.internals.safe_imports import cpu_only_import
  import cuml.internals.logger
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 1 for calling a global function with example usage: _get_datatype_from_inputs(data) and returns: datatype,  multiple