code: def seasonal_features_from_dates(
      df, config_seasonality: configure.ConfigSeasonality
  ):
      """Dataframe with seasonality features.
      Includes seasonality features, holiday features, and added regressors.
      Parameters
      ----------
          df : pd.DataFrame
              Dataframe with all values
          config_seasonality : configure.ConfigSeasonality
              Configuration for seasonalities
      Returns
      -------
          OrderedDict
              Dictionary with keys for each period name containing an np.array
              with the respective regression features. each with dims: (len(dates), 2*fourier_order)
      """
      dates = df["ds"]
      assert len(dates.shape) == 1
      seasonalities = OrderedDict({})
      # Seasonality features
      for name, period in config_seasonality.periods.items():
          if period.resolution > 0:
              if config_seasonality.computation == "fourier":
                  features = fourier_series(
                      dates=dates,
                      period=period.period,
                      series_order=period.resolution,
                  )
              else:
                  raise NotImplementedError
              if period.condition_name is not None:
                  features = (
                      features
                      * df[period.condition_name].values[:, np.newaxis]
                  )
              seasonalities[name] = features
      return seasonalities
  
imports: import logging
  from collections import OrderedDict, defaultdict
  from datetime import datetime
  from typing import Optional
  import numpy
  import pandas
  import torch
  from torch.utils.data.dataset import Dataset
  from neuralprophet import configure, utils
  from neuralprophet.df_utils import get_max_num_lags
  from neuralprophet.hdays_utils import get_country_holidays
label_desc: Use image node_id 8 for calling a global function with example usage: seasonal_features_from_dates(df, config_seasonality) and returns: seasonalities