processing.shape_check.apply_level_correction( y, reference,*, statistic='median', min_overlap=12,)
Shift a forecast so its central level matches a reference (debias).
Estimates the constant offset statistic(y) - statistic(reference) over the index overlap and subtracts it from every value of y, removing a systematic flat bias while preserving the daily shape. This is the post-hoc correction for the failure check_forecast_level detects.
The returned series keeps y’s full index, name, and ordering; only the level is shifted. The function is pure (no mutation of the inputs).