code: def _set_cpu_params(estimator: BaseEstimator, num_cpus: int) -> None:
      """Sets all CPU-related params to num_cpus (incl. nested)."""
      cpu_params = {
          param: num_cpus
          for param in estimator.get_params(deep=True)
          if any(
              param.endswith(cpu_param_name)
              for cpu_param_name in SKLEARN_CPU_PARAM_NAMES
          )
      }
      estimator.set_params(**cpu_params)
  
label_desc: Use image node_id 2 for calling a global function with example usage: _set_cpu_params(estimator, num_cpus) without return types