Refactors the code used to generate the cleaner Jupyter Notebook diffs into a single place, making it easier to improve functionality in the future.