code: def device_interop_preparation(init_func):
      """
      This function serves as a decorator for cuML estimators that implement
      the CPU/GPU interoperability feature. It processes the estimator's
      hyperparameters by saving them and filtering them for GPU execution.
      """
  
      @functools.wraps(init_func)
      def processor(self, *args, **kwargs):
          # if child class is already prepared for interop, skip
          if hasattr(self, "_full_kwargs"):
              return init_func(self, *args, **kwargs)
  
          # Save all kwargs
          self._full_kwargs = kwargs
          # Generate list of available cuML hyperparameters
          gpu_hyperparams = list(
              inspect.signature(init_func).parameters.keys()
          )
  
          # Filter provided parameters for cuML estimator initialization
          filtered_kwargs = {}
          for keyword, arg in self._full_kwargs.items():
              if keyword in gpu_hyperparams:
                  filtered_kwargs[keyword] = arg
              else:
                  logger.info(
                      "Unused keyword parameter: {} "
                      "during cuML estimator "
                      "initialization".format(keyword)
                  )
  
          return init_func(self, *args, **filtered_kwargs)
  
      return processor
  
imports: import contextlib
  import functools
  import inspect
  import typing
  import warnings
  from cuml.internals import input_utils
  from cuml.internals.api_context_managers import BaseReturnAnyCM
  from cuml.internals.api_context_managers import BaseReturnArrayCM
  from cuml.internals.api_context_managers import BaseReturnGenericCM
  from cuml.internals.api_context_managers import BaseReturnSparseArrayCM
  from cuml.internals.api_context_managers import InternalAPIContextBase
  from cuml.internals.api_context_managers import ReturnAnyCM
  from cuml.internals.api_context_managers import ReturnArrayCM
  from cuml.internals.api_context_managers import ReturnGenericCM
  from cuml.internals.api_context_managers import ReturnSparseArrayCM
  from cuml.internals.api_context_managers import set_api_output_dtype
  from cuml.internals.api_context_managers import set_api_output_type
  from cuml.internals.constants import CUML_WRAPPED_FLAG
  from cuml.internals.global_settings import GlobalSettings
  from cuml.internals.memory_utils import using_output_type
  from cuml.internals.type_utils import _DecoratorType, wraps_typed
  from cuml.internals import logger
label_desc: Use image node_id 8 for calling a global function with example usage: device_interop_preparation(init_func) and returns: processor, init_func, init_func