<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register(PluginClass):
 """ Register a plugin class. This function will call back your plugin's constructor. """

    if PluginClass in _cache.keys():
        raise Exception("Plugin class already registered")
    plugin = PluginClass()
    _cache[PluginClass] = plugin

    if getattr(PluginClass, 'extra_page_actions', False):
        for key in plugin.extra_page_actions:
            if key not in _extra_page_actions:
                _extra_page_actions[key] = []
            _extra_page_actions[key].extend(plugin.extra_page_actions[key])

    if getattr(PluginClass, 'extra_edit_actions', False):
        for key in plugin.extra_edit_actions:
            if key not in _extra_edit_actions:
                _extra_edit_actions[key] = []
            _extra_edit_actions[key].extend(plugin.extra_edit_actions[key])


    if getattr(PluginClass, 'navbar_links', False):
        _navbar_links.extend(list(plugin.navbar_links))