The sample scripts demonstrate how to call a script from a UI script. The calling script passes parameters to the Other script, and the other script returns values to the source script. Upload the scripts in Extender Setup > Scripts and review the structure.
Resources
Main navigation
Script calling other script and sharing data
General Python samples