def METHOD_NAME(self, previous_non_space, next2, do_newline):
    read = self.ins.read
    if previous_non_space and (previous_non_space in self.newlineend_strings or previous_non_space > '~'):
        while 1:
            if next2 < '!':
                next2 = read(1)
                if not next2:
                    break
            else:
                if next2 in self.newlinestart_strings \
                        or next2 > '~' or next2 == '/':
                    do_newline = True
                break
    return next2, do_newline