code: def execute_in_external_console(self, lines, focus_to_editor):
          
          console = self.ipyconsole
          console.switch_to_plugin()
          console.execute_code(lines)
          if focus_to_editor:
              self.editor.switch_to_plugin()
docs: Execute lines in IPython console and eventually set focus
          to the Editor.