<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def mount(self, app, prefix, **options):
        ''' Mount an application to a specific URL prefix. The prefix is added
            to SCIPT_PATH and removed from PATH_INFO before the sub-application
            is called.

            :param app: an instance of :class:`Bottle`.
            :param prefix: path prefix used as a mount-point.

            All other parameters are passed to the underlying :meth:`route` call.
        '''
        if not isinstance(app, Bottle):
            raise TypeError('Only Bottle instances are supported for now.')
        prefix = '/'.join([_f for _f in prefix.split('/') if _f])
        if not prefix:
            raise TypeError('Empty prefix. Perhaps you want a merge()?')
        for other in self.mounts:
            if other.startswith(prefix):
                raise TypeError('Conflict with existing mount: %s' % other)
        path_depth = prefix.count('/') + 1
        options.setdefault('method', 'ANY')
        options.setdefault('skip', True)
        self.mounts[prefix] = app
        @self.route('/%s/:#.*#' % prefix, **options)
        def mountpoint():
            request.path_shift(path_depth)
            return app._handle(request.environ)