def mount(self, prefix, app, **options):
if isinstance(app, str):<EOL><INDENT>prefix, app = app, prefix<EOL>depr('<STR_LIT>') <EOL><DEDENT>parts = [_f for _f in prefix.split('<STR_LIT:/>') if _f]<EOL>if not parts: raise ValueError('<STR_LIT>')<EOL>path_depth = len(parts)<EOL>options.setdefault('<STR_LIT>', True)<EOL>options.setdefault('<STR_LIT>', '<STR_LIT>')<EOL>@self.route('<STR_LIT>' % '<STR_LIT:/>'.join(parts), **options)<EOL>def mountpoint():<EOL><INDENT>try:<EOL><INDENT>request.path_shift(path_depth)<EOL>rs = BaseResponse([], <NUM_LIT:200>)<EOL>def start_response(status, header):<EOL><INDENT>rs.status = status<EOL>for name, value in header: rs.add_header(name, value)<EOL>return rs.body.append<EOL><DEDENT>rs.body = itertools.chain(rs.body, app(request.environ, start_response))<EOL>return HTTPResponse(rs.body, rs.status_code, rs.headers)<EOL><DEDENT>finally:<EOL><INDENT>request.path_shift(-path_depth)<EOL><DEDENT><DEDENT>if not prefix.endswith('<STR_LIT:/>'):<EOL><INDENT>self.route('<STR_LIT:/>' + '<STR_LIT:/>'.join(parts), callback=mountpoint, **options)<EOL><DEDENT>
Mount an application (:class:`Bottle` or plain WSGI) to a specific
            URL prefix. Example::

                root_app.mount('/admin/', admin_app)

            :param prefix: path prefix or `mount-point`. If it ends in a slash,
                that slash is mandatory.
            :param app: an instance of :class:`Bottle` or a WSGI application.

            All other parameters are passed to the underlying :meth:`route` call.