class_docstr: Callable objective function to be used with optuna.
class_docstr_tok: ["Callable","objective","function","to","be","used","with","optuna","."]
code: def best_trial(self):
      results = self.results.copy()
      target_metric_col = self.eval_metric
  
      if self.other_eval_metric:
          target_metric_col = "weighted_metric"
          results[target_metric_col] = results[
              self.eval_metric
          ] * self.alpha + results[self.other_eval_metric] * (
              1 - self.alpha
          )
  
      # NOTE: trial_idx != trial.id
      best_trial_idx = np.argmax(results[target_metric_col])
      return self.all_results[best_trial_idx]
  
imports: import dataclasses
  import logging
  import pickle
  import time
  from pathlib import Path
  from typing import Optional, Union
  import numpy
  import pandas
  from hpt.suggest import suggest_callable_hyperparams
  from omegaconf import DictConfig, OmegaConf
  from optuna.trial import BaseTrial
  from ..evaluation import evaluate_fairness, evaluate_performance
  from ..methods import InProcessing, PostProcessing, PreProcessing
  from ..methods.postprocessing.threshold import Threshold
label_desc: Use image node_id 4 for calling the ObjectiveFunction obj's underlying member method code with example usage: obj.best_trial() and returns: self