code: def _prepare_args(kwargs, create_keys, run_keys, fit_keys, backend):
      create_kwargs = _filter_tuner_args(kwargs, create_keys)
      run_kwargs = _filter_tuner_args(kwargs, run_keys)
      fit_kwargs = _filter_tuner_args(kwargs, fit_keys)
      # prepare sampler and pruner args
      sampler_type = create_kwargs.get("sampler", None)
      if sampler_type:
          sampler_args = create_kwargs.get("sampler_kwargs", None)
          sampler = backend.create_sampler(sampler_type, sampler_args)
          create_kwargs["sampler"] = sampler
          create_kwargs.pop("sampler_kwargs", None)
  
      pruner_type = create_kwargs.get("pruner", None)
      if pruner_type:
          pruner_args = create_kwargs.get("pruner_kwargs", {})
          pruner = backend.create_pruner(pruner_type, pruner_args)
          create_kwargs["pruner"] = pruner
          create_kwargs.pop("pruner_kwargs", None)
  
      # renamed callbacks to tune_callbacks to avoid conflict with fit param
      run_kwargs["callbacks"] = run_kwargs.get("tune_callbacks", None)
      run_kwargs.pop("tune_callbacks", None)
      run_kwargs["show_progress_bar"] = False
  
      return create_kwargs, run_kwargs, fit_kwargs
  
file_path: BigDL/python/nano/src/bigdl/nano/automl/hpo/search.py
imports: import optuna
  from bigdl.nano.utils.common import invalidInputError
label_desc: Use image node_id 6 for calling a global function with example usage: _prepare_args(kwargs, create_keys, run_keys, fit_keys, backend) and returns: create_kwargs,  run_kwargs,  fit_kwargs