code: def config_regressors_to_model_dims(config_regressors):
      """
      Convert the NeuralProphet user specified regressors configurations to input dims for TimeNet model.
  
      Parameters
      ----------
          config_regressors : configure.ConfigFutureRegressors
              Configurations for user specified regressors
  
      Returns
      -------
          OrderedDict
              Input dims for TimeNet model.
  
              Note
              ----
  
              This dictionaries' keys correspond to individual regressor and values in a dict containing the mode
              and the indices in the input dataframe corresponding to each regressor.
      """
      if config_regressors is None:
          return None
      else:
          additive_regressors = []
          multiplicative_regressors = []
  
          if config_regressors is not None:
              for regressor, configs in config_regressors.items():
                  mode = configs.mode
                  if mode == "additive":
                      additive_regressors.append(regressor)
                  else:
                      multiplicative_regressors.append(regressor)
  
          # sort based on event_delim
          regressors_dims = pd.DataFrame()
          if additive_regressors:
              additive_regressors = sorted(additive_regressors)
              additive_regressors_dims = pd.DataFrame(
                  data=additive_regressors, columns=["regressors"]
              )
              additive_regressors_dims["mode"] = "additive"
              regressors_dims = additive_regressors_dims
  
          if multiplicative_regressors:
              multiplicative_regressors = sorted(
                  multiplicative_regressors
              )
              multiplicative_regressors_dims = pd.DataFrame(
                  data=multiplicative_regressors, columns=["regressors"]
              )
              multiplicative_regressors_dims["mode"] = "multiplicative"
              regressors_dims = pd.concat(
                  [regressors_dims, multiplicative_regressors_dims]
              )
  
          regressors_dims_dic = OrderedDict({})
          # convert to dict format
          for index, row in regressors_dims.iterrows():
              regressors_dims_dic[row["regressors"]] = {
                  "mode": row["mode"],
                  "regressor_index": index,
              }
          return regressors_dims_dic
  
imports: from __future__ import annotations
  import logging
  import math
  import os
  import sys
  from collections import OrderedDict
  from typing import TYPE_CHECKING, Iterable, Optional, Union
  import numpy
  import pandas
  import pytorch_lightning
  import torch
  from neuralprophet import utils_torch
  from neuralprophet.hdays_utils import get_country_holidays
  from neuralprophet.logger import ProgressBar
label_desc: Use image node_id 16 for calling a global function with example usage: config_regressors_to_model_dims(config_regressors) and returns: None, regressors_dims_dic