def format_docstring(contents):
contents = contents.replace('<STR_LIT:\t>', u'<STR_LIT>' * <NUM_LIT:4>)<EOL>contents = contents.replace('<STR_LIT:U+0020>', u'<STR_LIT>' * <NUM_LIT:2>)<EOL>contents = contents.replace('<STR_LIT:*>', '<STR_LIT>')<EOL>return contents<EOL>
Python doc strings come in a number of formats, but LSP wants markdown.

    Until we can find a fast enough way of discovering and parsing each format,
    we can do a little better by at least preserving indentation.