See in particular https://github.com/jupyter/nbformat/pull/282. Validate mutating its argument is the root of a number of hidden bugs and a potential security issue.