<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_ipython_extension(ip):
 """Loads the interacting decorator that ships with `acorn` into the ipython interactive shell. Args: ip (IPython.core.interactiveshell.InteractiveShell):
 ipython shell instance for interacting with the shell variables. """

    decor = InteractiveDecorator(ip)
    ip.events.register('post_run_cell', decor.post_run_cell)

    #Unfortunately, the built-in "pre-execute" and "pre-run" methods are
    #triggered *before* the input from the cell has been stored to
    #history. Thus, we don't have access to the actual code that is about to be
    #executed. Instead, we use our own :class:`HistoryManager` that overrides
    #the :meth:`store_inputs` so we can handle the loop detection.
    newhist = AcornHistoryManager(ip.history_manager, decor)
    ip.history_manager = newhist