code: def get_dtype_from_model_func(func, default=None):
      """
      Function detect if model that `func` is bound to prefers data of certain
      data type. It checks the attribute model.dtype.
  
      Parameters
      ----------
      func: object
          Function to check whether the object it is bound to has a _get_tags
          attribute, and return tags from it.
      create_new: boolean (default = False)
          Whether to return a new RAFT handle if none could be fetched. Otherwise
          the function will return None.
      """
      dtype = getattr(getattr(func, "__self__", None), "dtype", None)
  
      dtype = default if dtype is None else dtype
  
      return dtype
  
file_path: cuml/python/cuml/explainer/common.py
imports: from cuml.internals.base import Base
  from cuml.internals.input_utils import input_to_cupy_array
  from pylibraft.common.handle import Handle
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 3 for calling a global function with example usage: get_dtype_from_model_func(func, default) and returns: dtype