code: def disable_ipython(self):
          
          from IPython.core.getipython import get_ipython
  
          self.ipython_enabled = False
          ip = get_ipython()
          formatter = ip.display_formatter.formatters['text/html']
          formatter.type_printers.pop(Visualization, None)
          formatter.type_printers.pop(VisualizationLocal, None)
docs: Disable plotting in the iPython notebook.
  
          After disabling, lightning plots will be produced in your lightning server,
          but will not appear in the notebook.