class_docstr: The Tuning objective for HPO.
code: def _prepare_fit_args(self, trial):
      # only do shallow copy and process/duplicate
      # specific args TODO: may need to handle more cases
      new_kwargs = copy.copy(self.kwargs)
      new_kwargs["verbose"] = 2
  
      # process batch size
      new_kwargs = self.backend.instantiate_param(
          trial, new_kwargs, "batch_size"
      )
  
      # process callbacks
      callbacks = new_kwargs.get("callbacks", None)
      callbacks = (
          callbacks() if inspect.isfunction(callbacks) else callbacks
      )
  
      if self.pruning:
          callbacks = callbacks or []
          prune_callback = create_tfkeras_pruning_callback(
              trial, self.target_metric
          )
          callbacks.append(prune_callback)
  
      new_kwargs["callbacks"] = callbacks
      return new_kwargs
  
file_path: BigDL/python/nano/src/bigdl/nano/automl/tf/objective.py
imports: from selectors import EpollSelector
  from tensorflow.keras.backend import clear_session
  from tensorflow.keras.models import clone_model
  import tensorflow
  import inspect
  import copy
  from bigdl.nano.automl.hpo.backend import create_tfkeras_pruning_callback
  from bigdl.nano.utils.common import invalidInputError
label_desc: Use image node_id 4 for calling the Objective obj's underlying member method code with example usage: obj._prepare_fit_args(trial) and returns: new_kwargs