code: def normalize(df, data_params):
      """
      Applies data scaling factors to df using data_params.
  
      Parameters
      ----------
          df : pd.DataFrame
              with columns ``ds``, ``y``, (and potentially more regressors)
          data_params : OrderedDict
              scaling values, as returned by init_data_params with ShiftScale entries containing ``shift`` and ``scale``
              parameters
  
      Returns
      -------
          pd.DataFrame
              normalized dataframes
      """
      df = df.copy(deep=True)
      for name in df.columns:
          if name not in data_params.keys():
              raise ValueError(f"Unexpected column {name} in data")
          new_name = name
          if name == "ds":
              new_name = "t"
          if name == "y":
              new_name = "y_scaled"
          df[new_name] = (
              df[name]
              .sub(data_params[name].shift)
              .div(data_params[name].scale)
          )
      return df
  
imports: from __future__ import annotations
  import logging
  import math
  from collections import OrderedDict
  from dataclasses import dataclass
  from typing import TYPE_CHECKING, List, Optional, Tuple
  import numpy
  import pandas
label_desc: Use image node_id 9 for calling a global function with example usage: normalize(df, data_params) and returns: df