code: def get_pred_from_proba_df(
      y_pred_proba: pd.DataFrame,
      problem_type: str = BINARY,
      decision_threshold: float = None,
  ) -> pd.Series:
      """
      From input DataFrame of pred_proba, return Series of pred.
      The input DataFrame's columns must be the names of the target classes.
      """
      if problem_type == REGRESSION:
          y_pred = y_pred_proba
      elif problem_type == QUANTILE:
          y_pred = y_pred_proba
      elif problem_type == BINARY and decision_threshold is not None:
          negative_class, positive_class = y_pred_proba.columns
          y_pred = get_pred_from_proba(
              y_pred_proba=y_pred_proba.values,
              problem_type=problem_type,
              decision_threshold=decision_threshold,
          )
          y_pred = [
              positive_class if pred == 1 else negative_class
              for pred in y_pred
          ]
          y_pred = pd.Series(data=y_pred, index=y_pred_proba.index)
      else:
          y_pred = y_pred_proba.idxmax(axis=1)
      return y_pred
  
imports: import logging
  import math
  import pickle
  import random
  import sys
  import time
  from typing import Callable, List, Tuple, Union
  import numpy
  import pandas
  import scipy.stats
  from numpy.typing import ArrayLike
  from pandas import DataFrame, Series
  from sklearn.model_selection import LeaveOneGroupOut, RepeatedKFold, RepeatedStratifiedKFold, train_test_split
  from autogluon.common.utils.resource_utils import ResourceManager
  from ..constants import BINARY, LARGE_DATA_THRESHOLD, MULTICLASS, MULTICLASS_UPPER_LIMIT, QUANTILE, REGRESS_THRESHOLD_LARGE_DATA, REGRESS_THRESHOLD_SMALL_DATA, REGRESSION, SOFTCLASS
  from ..metrics import Scorer, accuracy, pinball_loss, root_mean_squared_error
  from .miscs import warning_filter
label_desc: Use image node_id 9 for calling a global function with example usage: get_pred_from_proba_df(y_pred_proba, problem_type, decision_threshold) and returns: y_pred