code: def fbeta_score_evaluator(
      test_data: pd.DataFrame,
      threshold: float = 0.5,
      beta: float = 1.0,
      prediction_column: str = "prediction",
      target_column: str = "target",
      weight_column: str = None,
      eval_name: str = None,
  ) -> EvalReturnType:
      """
      Computes the F-beta score, given true label and prediction scores.
  
      Parameters
      ----------
  
      test_data : pandas.DataFrame
          A Pandas' DataFrame with target and prediction scores.
  
      threshold : float
          A threshold for the prediction column above which samples
           will be classified as 1
  
      beta : float
          The beta parameter determines the weight of precision in the combined score.
          beta < 1 lends more weight to precision, while beta > 1 favors recall
          (beta -> 0 considers only precision, beta -> inf only recall).
  
      prediction_column : str
          The name of the column in `test_data` with the prediction scores.
  
      target_column : str
          The name of the column in `test_data` with the binary target.
  
      weight_column : String (default=None)
          The name of the column in `test_data` with the sample weights.
  
      eval_name : str, optional (default=None)
          the name of the evaluator as it will appear in the logs.
  
      Returns
      ----------
      log: dict
          A log-like dictionary with the Precision Score
      """
  
      eval_data = test_data.assign(
          **{
              prediction_column: (
                  test_data[prediction_column] > threshold
              ).astype(int)
          }
      )
      eval_fn = generic_sklearn_evaluator(
          "fbeta_evaluator__", fbeta_score
      )
  
      return eval_fn(
          eval_data,
          prediction_column,
          target_column,
          weight_column,
          eval_name,
          beta=beta,
      )
  
imports: import warnings
  from typing import Any, Callable, Iterable, List
  import numpy
  import pandas
  import toolz
  from pandas.util import hash_pandas_object
  from sklearn.metrics import average_precision_score, brier_score_loss, fbeta_score, log_loss, mean_absolute_error, mean_squared_error, precision_score, r2_score, recall_score, roc_auc_score
  from toolz import curry, last, first
  from scipy import optimize
  from sklearn.linear_model import LogisticRegression
  from fklearn.types import EvalFnType, EvalReturnType, PredictFnType, UncurriedEvalFnType
label_desc: Use image node_id 7 for calling a global function with example usage: fbeta_score_evaluator(test_data, threshold, beta, prediction_column, target_column, weight_column, eval_name) and returns: eval_fn