code: def _convert_raw_predictions_to_raw_df(
      dates: pd.Series,
      predicted: np.ndarray,
      n_forecasts: int,
      quantiles: List[float],
      components: Optional[Components] = None,
  ) -> pd.DataFrame:
      """Turns forecast-origin-wise predictions into forecast-target-wise predictions.
  
      Parameters
      ----------
          dates : pd.Series
              timestamps referring to the start of the predictions.
          predicted : np.array
              Array containing the forecasts
          n_forecasts : int
              optional, number of steps ahead of prediction time step to forecast
          quantiles : list[float]
              optional, list of quantiles for quantile regression uncertainty estimate
          components : dict[np.array]
              Dictionary of components containing an array of each components' contribution to the forecast
  
      Returns
      -------
          pd. DataFrame
              columns ``ds``, ``y``, and [``step<i>``]
  
              Note
              ----
              where step<i> refers to the i-step-ahead prediction *made at* this row's datetime.
              e.g. the first forecast step0 is the prediction for this timestamp,
              the step1 is for the timestamp after, ...
              ... step3 is the prediction for 3 steps into the future,
              predicted using information up to (excluding) this datetime.
      """
      all_data = predicted
      df_raw = pd.DataFrame()
      df_raw.insert(0, "ds", dates.values)
      df_raw.insert(1, "ID", "__df__")  # type: ignore
      for forecast_lag in range(n_forecasts):
          for quantile_idx in range(len(quantiles)):
              # 0 is the median quantile index
              if quantile_idx == 0:
                  step_name = f"step{forecast_lag}"
              else:
                  step_name = f"step{forecast_lag} {quantiles[quantile_idx] * 100}%"
              data = all_data[:, forecast_lag, quantile_idx]
              ser = pd.Series(data=data, name=step_name)
              df_raw = df_raw.merge(
                  ser, left_index=True, right_index=True
              )
          if components is not None:
              for comp_name, comp_data in components.items():
                  comp_name_ = f"{comp_name}{forecast_lag}"
                  data = comp_data[
                      :, forecast_lag, 0
                  ]  # for components the quantiles are ignored for now
                  ser = pd.Series(data=data, name=comp_name_)
                  df_raw = df_raw.merge(
                      ser, left_index=True, right_index=True
                  )
      return df_raw
  
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 2 for calling a global function with example usage: _convert_raw_predictions_to_raw_df(dates, predicted, n_forecasts, quantiles, components) and returns: df_raw