code: def reconcile_forecasts(
      nixtla_df, forecast_df, hierarchy_df, hierarchy_dict
  ):
      """Reconciles forecast results according to the hierarchy."""
      if HierarchicalReconciliation is not None:
          reconcilers = [DEFAULT_RECONCILER()]
          hrec = HierarchicalReconciliation(reconcilers=reconcilers)
          reconciled_df = hrec.reconcile(
              Y_hat_df=forecast_df,
              Y_df=nixtla_df,
              S=hierarchy_df,
              tags=hierarchy_dict,
          )
          return get_results_from_reconciled_df(
              reconciled_df, hierarchy_df
          )
      else:
          log.logger.warning(
              "HierarchicalForecast is not installed, but `reconcile_forecasts` has been called. This should never happen."
          )
  
file_path: mindsdb/mindsdb/integrations/utilities/time_series_utils.py
imports: import numpy
  import pandas
  from pandas.tseries.frequencies import to_offset
  from sklearn.metrics import r2_score
  from mindsdb.utilities import log
label_desc: Use image node_id 8 for calling a global function with example usage: reconcile_forecasts(nixtla_df, forecast_df, hierarchy_df, hierarchy_dict) and returns: get_results_from_reconciled_df