code: def data_params_definition(
      df,
      normalize,
      config_lagged_regressors: Optional[ConfigLaggedRegressors] = None,
      config_regressors=None,
      config_events: Optional[ConfigEvents] = None,
      config_seasonality: Optional[ConfigSeasonality] = None,
      local_run_despite_global: Optional[bool] = None,
  ):
      """
      Initialize data scaling values.
  
      Note
      ----
      We do a z normalization on the target series ``y``,
      unlike OG Prophet, which does shift by min and scale by max.
  
      Parameters
      ----------
      df : pd.DataFrame
          Time series to compute normalization parameters from.
      normalize : str
          Type of normalization to apply to the time series.
  
              options:
  
                  ``soft`` (default), unless the time series is binary, in which case ``minmax`` is applied.
  
                  ``off`` bypasses data normalization
  
                  ``minmax`` scales the minimum value to 0.0 and the maximum value to 1.0
  
                  ``standardize`` zero-centers and divides by the standard deviation
  
                  ``soft`` scales the minimum value to 0.0 and the 95th quantile to 1.0
  
                  ``soft1`` scales the minimum value to 0.1 and the 90th quantile to 0.9
      config_lagged_regressors : configure.ConfigLaggedRegressors
          Configurations for lagged regressors
      normalize : bool
          data normalization
      config_regressors : configure.ConfigFutureRegressors
          extra regressors (with known future values) with sub_parameters normalize (bool)
      config_events : configure.ConfigEvents
          user specified events configs
      config_seasonality : configure.ConfigSeasonality
          user specified seasonality configs
  
      Returns
      -------
      OrderedDict
          scaling values with ShiftScale entries containing ``shift`` and ``scale`` parameters.
      """
  
      data_params = OrderedDict({})
      if df["ds"].dtype == np.int64:
          df["ds"] = df.loc[:, "ds"].astype(str)
      df["ds"] = pd.to_datetime(df.loc[:, "ds"])
      data_params["ds"] = ShiftScale(
          shift=df["ds"].min(),
          scale=df["ds"].max() - df["ds"].min(),
      )
      if "y" in df:
          data_params["y"] = get_normalization_params(
              array=df["y"].values,
              norm_type=normalize,
          )
  
      if config_lagged_regressors is not None:
          for covar in config_lagged_regressors.keys():
              if covar not in df.columns:
                  raise ValueError(
                      f"Lagged regressor {covar} not found in DataFrame."
                  )
              norm_type_lag = config_lagged_regressors[covar].normalize
              if local_run_despite_global:
                  if len(df[covar].unique()) < 2:
                      norm_type_lag = "soft"
              data_params[covar] = get_normalization_params(
                  array=df[covar].values,
                  norm_type=norm_type_lag,
              )
  
      if config_regressors is not None:
          for reg in config_regressors.keys():
              if reg not in df.columns:
                  raise ValueError(
                      f"Regressor {reg} not found in DataFrame."
                  )
              norm_type = config_regressors[reg].normalize
              if local_run_despite_global:
                  if len(df[reg].unique()) < 2:
                      norm_type = "soft"
              data_params[reg] = get_normalization_params(
                  array=df[reg].values,
                  norm_type=norm_type,
              )
      if config_events is not None:
          for event in config_events.keys():
              if event not in df.columns:
                  raise ValueError(
                      f"Event {event} not found in DataFrame."
                  )
              data_params[event] = ShiftScale()
      if config_seasonality is not None:
          for season in config_seasonality.periods:
              condition_name = config_seasonality.periods[
                  season
              ].condition_name
              if condition_name is not None:
                  if condition_name not in df.columns:
                      raise ValueError(
                          f"Seasonality condition {condition_name} not found in DataFrame."
                      )
                  data_params[condition_name] = ShiftScale()
      return data_params
  
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 5 for calling a global function with example usage: data_params_definition(df, normalize, config_lagged_regressors, config_regressors, config_events, config_seasonality, local_run_despite_global) and returns: data_params