You can now define custom functions that can be later reused in any of your DataJet scripts. You can find out more about functions in DataJet docs.