Ok, here is the solution.
the textwraps module include some method of text process. the dedent method docsting was "Remove any common leading whitespace from every line in text.". It will deal with the "\t", " "(space) nice.
and, I don't think when I get an error input, I should return an right output.
otherwise, when the framework get an Index code that right code indent, remove it's indent(can be understood as remove the origin namespace), and do it.