The code to insert somewhere into your Jupyter notebook is pretty simple:

%load_ext autoreload
%autoreload 2

When you’re working on an external library or piece of Python code outside the contents of your notebook, this snippet will make sure that the updated functions and constants will always be available in their most-recently edited state.