<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def format_docstring(contents):
 """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. """

    contents = contents.replace('\t', u'\u00A0' * 4)
    contents = contents.replace('  ', u'\u00A0' * 2)
    contents = contents.replace('*', '\\*')
    return contents