code: def _get_model_fcn(
      df: pd.DataFrame,
      treatment_col: str,
      treatment_name: str,
      learner: Callable,
  ) -> Tuple[Callable, dict, dict]:
      """
      Returns a function that predicts the target column from the features.
      """
  
      treatment_names = df[treatment_col].unique()
  
      if treatment_name not in treatment_names:
          raise MissingTreatmentError()
  
      df = (
          df.loc[df[treatment_col] == treatment_name]
          .reset_index(drop=True)
          .copy()
      )
  
      return learner(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 11 for calling a global function with example usage: _get_model_fcn(df, treatment_col, treatment_name, learner) and returns: learner