'Installs a panel on the editor.
:param panel: Panel to install
:param position: Position where the panel must be installed.
:return: The installed panel'

def register(self, panel, position=Panel.Position.LEFT):

    assert (panel is not None)
    pos_to_string = {Panel.Position.BOTTOM: 'bottom', Panel.Position.LEFT: 'left', Panel.Position.RIGHT: 'right', Panel.Position.TOP: 'top', Panel.Position.FLOATING: 'floating'}
    debug_print('adding    panel    {}    at    {}'.format(panel.name, pos_to_string[position]))
    panel.order_in_zone = len(self._panels[position])
    self._panels[position][panel.name] = panel
    panel.position = position
    panel.on_install(self.editor)
    debug_print('panel    {}    installed'.format(panel.name))
    return panel
