If you not use the LOCAL_FORECAST, the function only works for that specific forecast. When you use the forecast argument, your function is reusable for every forecast that is passed to it as argument.