def pretty_message(string, *params):
output = textwrap.dedent(string)<EOL>if output.find('<STR_LIT:\n>') != -<NUM_LIT:1>:<EOL><INDENT>output = re.sub('<STR_LIT>', '<STR_LIT:U+0020>', output)<EOL><DEDENT>if params:<EOL><INDENT>output = output % params<EOL><DEDENT>output = output.strip()<EOL>return output<EOL>
Takes a multi-line string and does the following:

 - dedents
 - converts newlines with text before and after into a single line
 - strips leading and trailing whitespace

:param string:
    The string to format

:param *params:
    Params to interpolate into the string

:return:
    The formatted string