Modified MOOSE environment as a function