What do you do if a student is this close to finishing their graduate degree but they just can't get some parts of the thesis (papers) written, either because they can't write, won't write, don't know how to stop writing, or don't have time to write? How much help do you, the advisor, provide?
1 - none, except the usual advisorial encouragement. It's their thesis, and if they can't write it, they don't get the degree, even if they are so so so so so close to finishing.
2 - a moderate amount, but not to the point of actually writing text for them. You can 'outline' sections of text for them to fill in (thesis Mad Libs), and even sit next to them giving them suggestions of words and phrases to type and plying them with double espressos, but you don't actually do any writing.
3 - a lot, even to the point of writing significant amounts of text.
Option #3 might sound unethical, but this is not necessarily the case. For example, if you are a co-author on papers that comprise the thesis, it's reasonable for you to do some of the writing. Your contribution will be indicated in the thesis by your co-authorship of the constituent papers. The problem comes if a lot really means a lot.
Some students with many co-authored 'thesis chapters' (papers) may have a problem getting their thesis approved if 'too many' of their thesis chapter papers were primarily written by/with others, but if the student has taken the lead on most of the chapters/papers, it's not a problem to have co-authored some. The worst (and least ethical) situation is when the only way a thesis will get done is if the advisor ghost-writes the thesis.
I wish I could have a consistent policy regarding how much I help students with finishing a thesis, but that isn't possible. Situations vary depending on the urgency of the publication(s) resulting from thesis research, and the consequences (for me, for my other students) of not publishing thesis results and of not having a student get their degree.
A possible solution for MS students who can't write their own thesis would be to let them get a different type of degree -- e.g. one that requires only coursework and no thesis. Even if the original intention was that they write a thesis, if that's not going to happen but the student has spent years taking classes, they might as well have something to show for their time and efforts. If the advisor writes a paper based on the student's work, the student can be a co-author, or even first author, depending on the particular situation.
PhD student who can't or won't write are a much bigger problem. You would think that a PhD student nearing completion would smell the barn or see the light at the end of the tunnel or [insert similar analogy]. Alas, in my experience it is the rare student who accelerates across the finish line. Many have to be dragged, and some of that dragging may involve the advisor's doing various amounts of writing for the student.
It is disturbing how many professors I know who joke about how many MS and PhD theses they have written (for other people), but it is also understandable that this is a common situation. Most of us want our students to finish and not collapse in a desperate heap just short of the finish line, unable to get across without being dragged. Is it cheating to help them? Is it unfair to those who finish their thesis without help? Perhaps, but it's not really a race.
6 years ago