Python script

how can i add function in a script from a plugin ?