code: def get_handle_from_cuml_model_func(func, create_new=False):
      """
      Function to obtain a RAFT handle from the object that `func` is bound to
      if possible.
  
      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.
      """
      owner = getattr(func, "__self__", None)
  
      if owner is not None and isinstance(owner, Base):
          if owner.handle is not None:
              return owner.handle
  
      handle = Handle() if create_new else None
      return handle
  
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 2 for calling a global function with example usage: get_handle_from_cuml_model_func(func, create_new) and returns: handle, owner