code: def register(self, name, function, plugin, description=None):
          
          if name in self.threads.keys():
              raise ThreadExistsException("Thread %s was already registered by %s" %
                                          (name, self.threads[name].plugin.name))
  
          self.threads[name] = Thread(name, function, plugin, description)
          self.__log.debug("Thread %s registered by %s" % (name, plugin.name))
          return self.threads[name]
docs: Registers a new document.
  
          .. warning: You can not use any relative links inside a given document.
                      For instance, sphinx's toctree, image, figure or include statements do not work.
  
          :param function: Function, which gets called for the new thread
          :type function: function
          :param name: Unique name of the thread for documentation purposes.
          :param plugin: Plugin object, under which the threads where registered
          :type plugin: GwBasePattern
          :param description: Short description of the thread