Python error: document currently modifiable, but not after copy/pasting node

I did some searching on similar famdoc / EditFamily code snippets. This thread seems interesting. Might be related…