Further investigation reveals that the external python-mode (that is, https://gitlab.com/python-mode-devs/python-mode) effectively implements the `py-indent-line' function, so that was the target. I guess the attached patch should be ignored. The docstring typo seems real, though.