code: def _apply_min_max(
      df: pd.DataFrame,
      old_min: int | float | pd.Series,
      old_max: int | float | pd.Series,
      new_min: int | float | pd.Series,
      new_max: int | float | pd.Series,
  ) -> pd.DataFrame:
      """
      Apply minimax scaler to DataFrame.
  
      Notes
      -----
      - Inputting minimum and maximum type
          - int or float : It will apply minimax to the entire DataFrame.
          - Series : It will apply minimax to each column.
  
      .. # noqa: DAR101
      .. # noqa: DAR201
      """
  
      old_range = old_max - old_min
      new_range = new_max - new_min
  
      return (df - old_min) * new_range / old_range + new_min
  
imports: from __future__ import annotations
  import pandas
  import pandas_flavor
  from janitor.utils import deprecated_alias, deprecated_kwargs
label_desc: Use image node_id 3 for calling a global function with example usage: _apply_min_max(df, old_min, old_max, new_min, new_max) and returns: unknown