After the endfunction line, built in tests should be added. These are tests for expected input handling, output, error cases, etc., and can be run by others to make sure any other changes don't break this function. Each function should have at least one test. Demo's can also be added for functions that warrant it. Would recommend peeking at some of the other Octave functions to see examples of these and documentation formatting.
https://www.gnu.org/software/octave/doc/v4.2.1/Test-and-Demo-Functions.html#Test-and-Demo-FunctionsOnce you get a handle on coding m-files for octave, contributing would follow the guidelines here