When running nbdev_update
some of the directives will be duplicated in the notebook (I haven't identified the pattern which will be duplicated and which not)
Therefore, a subsequent nbdev_export
can result in a py file with the same directive appearing 3 times.
I believe I have solved the issue and will open a pull request.