Delay function not working as a global function

Hi, I’m having trouble with my delay function that I’ve tried to store in an object in collection pre-script for reusability. It doesn’t actually perform a delay and instantly sends the next request despite working if it was just in the test-script itself.

Function stored in collection pre-script.
image

Function being called in test script of request, rest of code is commented out.
image

I found this problem after searching for other solutions to find how to store functions globally for re-use.
javascript - How to Write Global Functions in Postman - Stack Overflow