Adds a search engine with the given name.

        ``engine`` must be the **class** object rather than
        an instance. The class *must* be a subclass of
        :class:`dossier.web.SearchEngine`, which should provide a means
        of obtaining recommendations given a query.

        The ``engine`` must be a class so that its dependencies can be
        injected when the corresponding route is executed by the user.

        If ``engine`` is ``None``, then it removes a possibly existing
        search engine named ``name``.

        :param str name: The name of the search engine. This appears
                         in the list of search engines provided to the
                         user, and is how the search engine is invoked
                         via REST.
        :param engine: A search engine *class*.
        :type engine: `type`
        :rtype: :class:`WebBuilder`

def add_search_engine(self, name, engine):
        '''Adds a search engine with the given name.

        ``engine`` must be the **class** object rather than
        an instance. The class *must* be a subclass of
        :class:`dossier.web.SearchEngine`, which should provide a means
        of obtaining recommendations given a query.

        The ``engine`` must be a class so that its dependencies can be
        injected when the corresponding route is executed by the user.

        If ``engine`` is ``None``, then it removes a possibly existing
        search engine named ``name``.

        :param str name: The name of the search engine. This appears
                         in the list of search engines provided to the
                         user, and is how the search engine is invoked
                         via REST.
        :param engine: A search engine *class*.
        :type engine: `type`
        :rtype: :class:`WebBuilder`
        '''
        if engine is None:
            self.search_engines.pop(name, None)
        self.search_engines[name] = engine
        return self