Remove a method call which depends on IPython.

Because IPython is not part of edx-platform dependencies, the
method assert_in has to be defined.
Merge pull request #3170 from edx/valera/remove_ipython_dependent_methods

Remove a method call which depends on IPython.