import six
# only run for python 3, or else syntax errors
if six.PY3:
    from ._partial_run import *

import six


def load_ipython_extension(shell):
    # only run for python 3, or else syntax errors
    if not six.PY3:
        return
    from ._partial_run import safe_run_module
    shell.safe_run_module = safe_run_module.__get__(shell)

Update to use ipython kernel extension
Update to use ipython kernel extension

  import six
- # only run for python 3, or else syntax errors
- if six.PY3:
-     from ._partial_run import *
  
+ 
+ def load_ipython_extension(shell):
+     # only run for python 3, or else syntax errors
+     if not six.PY3:
+         return
+     from ._partial_run import safe_run_module
+     shell.safe_run_module = safe_run_module.__get__(shell)
+ 
Update to use ipython kernel extension
## Code Before:
import six
# only run for python 3, or else syntax errors
if six.PY3:
    from ._partial_run import *

## Instruction:
Update to use ipython kernel extension
## Code After:
import six


def load_ipython_extension(shell):
    # only run for python 3, or else syntax errors
    if not six.PY3:
        return
    from ._partial_run import safe_run_module
    shell.safe_run_module = safe_run_module.__get__(shell)
