<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _write_line(self, line=None):
 """ Appends a line of code to the generated code and adjust the indent level of the generated code. :param line: The line of code (with out LF) that must be appended. """

        if line is None:
            self._write("\n")
            if self.__indent_level > 1:
                self.__indent_level -= 1
        elif line == '':
            self._write("\n")
        else:
            line = (' ' * 4 * self.__indent_level) + line
            if line[-1:] == ':':
                self.__indent_level += 1
            self._write(line + "\n")