The control flow in this method is not trivial. I'd prefer to document why do we change `line_number` in line 1369 and 1372 and that we don't check the last line of docstring in 1370-1372 for-loop (that is done by 1374 clause).