<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def enable_ipython(self, **kwargs):
 """ Enable plotting in the iPython notebook. Once enabled, all lightning plots will be automatically produced within the iPython notebook. They will also be available on your lightning server within the current session. """


        # inspired by code powering similar functionality in mpld3
        # https://github.com/jakevdp/mpld3/blob/master/mpld3/_display.py#L357

        from IPython.core.getipython import get_ipython
        from IPython.display import display, Javascript, HTML

        self.ipython_enabled = True
        self.set_size('medium')

        ip = get_ipython()
        formatter = ip.display_formatter.formatters['text/html']

        if self.local_enabled:
            from lightning.visualization import VisualizationLocal
            js = VisualizationLocal.load_embed()
            display(HTML("<script>" + js + "</script>"))
            if not self.quiet:
                print('Running local mode, some functionality limited.\n')
            formatter.for_type(VisualizationLocal, lambda viz, kwds=kwargs: viz.get_html())
        else:
            formatter.for_type(Visualization, lambda viz, kwds=kwargs: viz.get_html())
            r = requests.get(self.get_ipython_markup_link(), auth=self.auth)
            display(Javascript(r.text))