code: def _create_dataset(
      model, df, predict_mode, prediction_frequency=None
  ):
      """Construct dataset from dataframe.
  
      (Configured Hyperparameters can be overridden by explicitly supplying them.
      Useful to predict a single model component.)
  
      Parameters
      ----------
          df : pd.DataFrame
              dataframe containing column ``ds``, ``y``, and optionally``ID`` and
              normalized columns normalized columns ``ds``, ``y``, ``t``, ``y_scaled``
          predict_mode : bool
              specifies predict mode
  
              Options
                  * ``False``: includes target values.
                  * ``True``: does not include targets but includes entire dataset as input
  
          prediction_frequency: dict
              periodic interval in which forecasts should be made.
              Key: str
                  periodicity of the predictions to be made, e.g. 'daily-hour'.
  
              Options
                  * ``'hourly-minute'``: forecast once per hour at a specified minute
                  * ``'daily-hour'``: forecast once per day at a specified hour
                  * ``'weekly-day'``: forecast once per week at a specified day
                  * ``'monthly-day'``: forecast once per month at a specified day
                  * ``'yearly-month'``: forecast once per year at a specified month
  
              value: int
                  forecast origin of the predictions to be made, e.g. 7 for 7am in case of 'daily-hour'.
  
      Returns
      -------
          TimeDataset
      """
      df, _, _, _ = df_utils.prep_or_copy_df(df)
      return time_dataset.GlobalTimeDataset(
          df,
          predict_mode=predict_mode,
          n_lags=model.n_lags,
          n_forecasts=model.n_forecasts,
          predict_steps=model.predict_steps,
          config_seasonality=model.config_seasonality,
          config_events=model.config_events,
          config_country_holidays=model.config_country_holidays,
          config_lagged_regressors=model.config_lagged_regressors,
          config_regressors=model.config_regressors,
          config_missing=model.config_missing,
          prediction_frequency=prediction_frequency,
      )
  
file_path: neural_prophet/neuralprophet/data/process.py
imports: import logging
  from typing import List, Optional
  import numpy
  import pandas
  from neuralprophet import df_utils, time_dataset
  from neuralprophet.configure import ConfigCountryHolidays, ConfigEvents, ConfigFutureRegressors, ConfigLaggedRegressors, ConfigSeasonality
  from neuralprophet.np_types import Components
label_desc: Use image node_id 7 for calling a global function with example usage: _create_dataset(model, df, predict_mode, prediction_frequency) and returns: time_dataset