docstr: Returns a mock IPython application with a mocked kernel 
docstr_tok: ["Returns","a","mock","IPython","application","with","a","mocked","kernel"]
code: def _mock_get_ipython(self, msg_id):
      """Returns a mock IPython application with a mocked kernel"""
      kernel = type(
          "mock_kernel",
          (object,),
          {"_parent_header": {"header": {"msg_id": msg_id}}},
      )
  
      # Specifically override this so the traceback
      # is still printed to screen
      def showtraceback(self_, exc_tuple, *args, **kwargs):
          etype, evalue, tb = exc_tuple
          raise etype(evalue)
  
      ipython = type(
          "mock_ipython",
          (object,),
          {"kernel": kernel, "showtraceback": showtraceback},
      )
      return ipython
  
file_path: catboost/contrib/python/ipywidgets/py3/ipywidgets/widgets/tests/test_widget_output.py
imports: import sys
  from unittest import TestCase
  from contextlib import contextmanager
  from IPython.display import Markdown, Image
  from ipywidgets import widget_output
label_desc: Use image node_id 2 for calling the TestOutputWidget obj's underlying member method code with example usage: obj._mock_get_ipython(msg_id) and returns: ipython