Added to docstring.
Added test and code for topports function.