You could add both functions into a custom module ...
# suitescript
k
You could add both functions into a custom module and then call that custom module to use when you require it in any script.