Fix PY-21429 Duplicate output in Jupyter Notebook