Bug/Request Need a true "Pre batch script"

The current "Pre batch script" is not a pre batch script!

That is, it does not run before all the (other) methods in a batch.

Rather all the methods before the script run through all of the files, then the "Pre batch script" FOR THAT STEP runs, then the main script loops through the files -- for that step**.

Admittedly, this can be useful once a user figures out that that is what is happening.
But it's misleading and Computation/time costs jump, potentially exponentially.

But the real problem is that we can't do something like:
function bigCasino (foo) { /* really expensive stuff here*/ }

in a Universal pre-batch and have it available to all the separate script methods in a batch.

==> Please provide a Universal pre-batch where we can define variables/functions available to more than one script method in the batch.

==> Rename the current "Pre batch script" to "Pre step Loop" or similar -- or at least document the behavior of this code on the help page.

~~~~~
** Is the program looping the files O(n), or more, separately for each method in a batch? (Not a criticism, just useful to know when planning large tasks)