code: def prediction_ranger(
      df: pd.DataFrame,
      prediction_min: float,
      prediction_max: float,
      prediction_column: str = "prediction",
  ) -> LearnerReturnType:
      """
      Caps and floors the specified prediction column to a set range.
  
      Parameters
      ----------
      df : pandas.DataFrame
          A Pandas' DataFrame that must contain a `prediction_column` columns.
  
      prediction_min : float
          The floor for the prediction.
  
      prediction_max : float
          The cap for the prediction.
  
      prediction_column : str
          The name of the column in `df` to cap and floor
      """
  
      def p(new_df: pd.DataFrame) -> pd.DataFrame:
          return new_df.assign(
              **{
                  prediction_column: new_df[prediction_column].clip(
                      lower=prediction_min, upper=prediction_max
                  )
              }
          )
  
      p.__doc__ = learner_pred_fn_docstring("prediction_ranger")
  
      log = {
          "prediction_ranger": {
              "prediction_min": prediction_min,
              "prediction_max": prediction_max,
              "transformed_column": [prediction_column],
          }
      }
  
      return p, p(df), log
  
imports: from typing import Any, Callable, Dict, List, Union, Optional
  import numpy
  import pandas
  from numpy import nan
  from sklearn.preprocessing import StandardScaler
  from statsmodels.distributions import empirical_distribution
  from toolz import curry, merge, compose, mapcat
  from fklearn.common_docstrings import learner_return_docstring, learner_pred_fn_docstring
  from fklearn.training.utils import log_learner_time
  from fklearn.types import LearnerReturnType, LearnerLogType
  from fklearn.preprocessing.schema import column_duplicatable
label_desc: Use image node_id 6 for calling a global function with example usage: prediction_ranger(df, prediction_min, prediction_max, prediction_column) and returns: p,  p,  log, new_df