this fixes argparse to use parse_known_args. previously, if an unknown argument was passed, argparse would fail with an unrecognized arguments: %s error.
why
the documentation mentions being able to run TestShell in a REPL interpreter or a jupyter notebook. when i tried to run inside a jupyter notebook, i got the following error:

this was due to the notebook passing the filename of the notebook as an argument. this is a known problem with notebooks and argparse, documented here: https://stackoverflow.com/questions/48796169/how-to-fix-ipykernel-launcher-py-error-unrecognized-arguments-in-jupyter
testing
to test, make sure you have jupyter notebooks installed. you can do this by running:
pip install notebook
or following instructions from here.
once installed, start a notebook (jupyter notebook), launch a python3 kernel and run the following snippet:
import sys
# make sure this is the path for your system
sys.path.insert(0, "/path/to/bitcoin/test/functional")
from test_framework.test_shell import TestShell
test = TestShell().setup(num_nodes=2, setup_clean_chain=True)
you should see the following output, without errors:

if you are unfamiliar with notebooks, here is a short guide on using them: https://jupyter.readthedocs.io/en/latest/running.html