def METHOD_NAME(self, shellwidget):
    """Add shellwidget."""
    # Leave this import here so that we avoid importing Matplotlib (which
    # is imported by matplotlib_inline unconditionally) before the main
    # window is visible. We do this because Matplotlib takes a long time
    # to be imported, so it makes Spyder appear slow to start to users.
    from spyder_kernels.utils.mpl import MPL_BACKENDS_FROM_SPYDER
    shellwidget.kernel_handler.kernel_comm.register_call_handler(
        "update_matplotlib_gui",
        lambda gui, sid=id(shellwidget):
            self.update_matplotlib_gui(gui, sid)
    )
    backend = MPL_BACKENDS_FROM_SPYDER[
        str(self.get_conf('pylab/backend'))
    ]
    swid = id(shellwidget)
    self._shellwidget_dict[swid] = {
        "gui": backend,
        "widget": shellwidget,
    }
    self.set_shellwidget(shellwidget)