def mount(self, root, script_name='', config=None):
        """Mount a new app from a root object, script_name, and config.

        root
            An instance of a "controller class" (a collection of page
            handler methods) which represents the root of the application.
            This may also be an Application instance, or None if using
            a dispatcher other than the default.

        script_name
            A string containing the "mount point" of the application.
            This should start with a slash, and be the path portion of the
            URL at which to mount the given root. For example, if root.index()
            will handle requests to "http://www.example.com:8080/dept/app1/",
            then the script_name argument would be "/dept/app1".

            It MUST NOT end in a slash. If the script_name refers to the
            root of the URI, it MUST be an empty string (not "/").

        config
            A file or dict containing application config.
        """
        if script_name is None:
            raise TypeError(
                "The 'script_name' argument may not be None. Application "
                'objects may, however, possess a script_name of None (in '
                'order to inpect the WSGI environ for SCRIPT_NAME upon each '
                'request). You cannot mount such Applications on this Tree; '
                'you must pass them to a WSGI server interface directly.',
            )

        # Next line both 1) strips trailing slash and 2) maps "/" -> "".
        script_name = script_name.rstrip('/')

        if isinstance(root, Application):
            app = root
            if script_name != '' and script_name != app.script_name:
                raise ValueError(
                    'Cannot specify a different script name and pass an '
                    'Application instance to cherrypy.mount',
                )
            script_name = app.script_name
        else:
            app = Application(root, script_name)

            # If mounted at "", add favicon.ico
            needs_favicon = (
                script_name == ''
                and root is not None
                and not hasattr(root, 'favicon_ico')
            )
            if needs_favicon:
                favicon = os.path.join(
                    os.getcwd(),
                    os.path.dirname(__file__),
                    'favicon.ico',
                )
                root.favicon_ico = tools.staticfile.handler(favicon)

        if config:
            app.merge(config)

        self.apps[script_name] = app

        return app
Mount a new app from a root object, script_name, and config.

        root
            An instance of a "controller class" (a collection of page
            handler methods) which represents the root of the application.
            This may also be an Application instance, or None if using
            a dispatcher other than the default.

        script_name
            A string containing the "mount point" of the application.
            This should start with a slash, and be the path portion of the
            URL at which to mount the given root. For example, if root.index()
            will handle requests to "http://www.example.com:8080/dept/app1/",
            then the script_name argument would be "/dept/app1".

            It MUST NOT end in a slash. If the script_name refers to the
            root of the URI, it MUST be an empty string (not "/").

        config
            A file or dict containing application config.
        
cherrypy/_cptree.py