code: def _get_dtype(X):
      """
      Returns the valid dtype for tf-idf transformer
      """
      import numpy as np
  
      FLOAT_DTYPES = (np.float64, np.float32, np.float16)
  
      dtype = X.dtype if X.dtype in FLOAT_DTYPES else cp.float32
      return dtype
  
imports: from cuml import Base
  from cuml.internals.array import CumlArray
  from cuml.common.sparsefuncs import csr_diag_mul
  from cuml.common.sparsefuncs import csr_row_normalize_l1, csr_row_normalize_l2
  import cuml.internals
  from cuml.common.exceptions import NotFittedError
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 2 for calling a global function with example usage: _get_dtype(X) and returns: dtype