The documentation formatter for Python3 doesn't properly deal with
(out) arguments, which leads to those being added as function
arguments, rather than return values. This commit fixes that by mostly
copying the logic from the GJS formatter.
For future work, it might be worth looking into whether Python type annotations can be used to add types to arguments.