code: def _simulate_treatment_effect(
      df: pd.DataFrame,
      treatments: list,
      control_name: str,
      learners: dict,
      prediction_column: str,
  ) -> pd.DataFrame:
      uplift_cols = []
      scored_df = df.copy()
      for treatment in treatments:
          learner_fcn = learners[treatment]
  
          scored_df[
              f"treatment_{treatment}__{prediction_column}_on_treatment"
          ] = _predict_by_treatment_flag(
              df=scored_df,
              learner_fcn=learner_fcn,
              is_treatment=True,
              prediction_column=prediction_column,
          )
          scored_df[
              f"treatment_{treatment}__{prediction_column}_on_control"
          ] = _predict_by_treatment_flag(
              df=scored_df,
              learner_fcn=learner_fcn,
              is_treatment=False,
              prediction_column=prediction_column,
          )
  
          uplift_cols.append(f"treatment_{treatment}__uplift")
          scored_df[uplift_cols[-1]] = (
              scored_df[
                  f"treatment_{treatment}__{prediction_column}_on_treatment"
              ]
              - scored_df[
                  f"treatment_{treatment}__{prediction_column}_on_control"
              ]
          )
  
      scored_df["uplift"] = scored_df[uplift_cols].max(axis=1).values
      scored_df["suggested_treatment"] = np.where(
          scored_df["uplift"].values <= 0,
          control_name,
          scored_df[uplift_cols].idxmax(axis=1).values,
      )
      scored_df["suggested_treatment"] = (
          scored_df["suggested_treatment"]
          .apply(lambda x: x.replace("__uplift", ""))
          .values
      )
  
      return scored_df
  
imports: import copy
  import inspect
  from typing import Callable, Dict, List, Tuple
  import numpy
  import pandas
  from toolz import curry
  from fklearn.common_docstrings import learner_pred_fn_docstring, learner_return_docstring
  from fklearn.exceptions.exceptions import MissingControlError, MissingTreatmentError, MultipleTreatmentsError
  from fklearn.training.pipeline import build_pipeline
  from fklearn.types import LearnerFnType, LearnerReturnType, PredictFnType
label_desc: Use image node_id 8 for calling a global function with example usage: _simulate_treatment_effect(df, treatments, control_name, learners, prediction_column) and returns: scored_df