Custom functions in watcher

Can we write some functions [in painless] and use them across multiple watchers?
If possible, can u please share the details

would stored scripts work for you or is intention to share more of your functions among different scripts?