Custom functions in Pavlovia

How have you worded the function definition?

Is it in Before or Begin Experiment?