'Accept ``url`` and ``registry``; create a :term:`request` and
find a :app:`Pyramid` view based on introspection of :term:`view
configuration` within the application registry; return the view.'

def _find_view(self, request):

    from zope.interface import providedBy
    from zope.interface import implementer
    from pyramid.interfaces import IRequest
    from pyramid.interfaces import IRootFactory
    from pyramid.interfaces import IRouteRequest
    from pyramid.interfaces import IRoutesMapper
    from pyramid.interfaces import ITraverser
    from pyramid.traversal import DefaultRootFactory
    from pyramid.traversal import ResourceTreeTraverser
    registry = request.registry
    q = registry.queryUtility
    root_factory = q(IRootFactory, default=DefaultRootFactory)
    routes_mapper = q(IRoutesMapper)
    adapters = registry.adapters
    @implementer(IMultiView)
    class RoutesMultiView(object, ):
        def __init__(self, infos, context_iface, root_factory, request):
            self.views = []
            for info in infos:
                (match, route) = (info['match'], info['route'])
                if (route is not None):
                    request_iface = registry.queryUtility(IRouteRequest, name=route.name, default=IRequest)
                    views = _find_views(request.registry, request_iface, context_iface, '')
                    if (not views):
                        continue
                    view = views[0]
                    view.__request_attrs__ = {}
                    view.__request_attrs__['matchdict'] = match
                    view.__request_attrs__['matched_route'] = route
                    root_factory = (route.factory or root_factory)
                    root = root_factory(request)
                    traverser = adapters.queryAdapter(root, ITraverser)
                    if (traverser is None):
                        traverser = ResourceTreeTraverser(root)
                    tdict = traverser(request)
                    view.__request_attrs__.update(tdict)
                    if (not hasattr(view, '__view_attr__')):
                        view.__view_attr__ = ''
                    self.views.append((None, view, None))
    context = None
    routes_multiview = None
    attrs = request.__dict__
    request_iface = IRequest
    if (routes_mapper is not None):
        infos = self._find_multi_routes(routes_mapper, request)
        if (len(infos) == 1):
            info = infos[0]
            (match, route) = (info['match'], info['route'])
            if (route is not None):
                attrs['matchdict'] = match
                attrs['matched_route'] = route
                request.environ['bfg.routes.matchdict'] = match
                request_iface = registry.queryUtility(IRouteRequest, name=route.name, default=IRequest)
                root_factory = (route.factory or root_factory)
        if (len(infos) > 1):
            routes_multiview = infos
    root = root_factory(request)
    attrs['root'] = root
    traverser = adapters.queryAdapter(root, ITraverser)
    if (traverser is None):
        traverser = ResourceTreeTraverser(root)
    tdict = traverser(request)
    (context, view_name) = (tdict['context'], tdict['view_name'])
    attrs.update(tdict)
    context_iface = providedBy(context)
    if (routes_multiview is None):
        views = _find_views(request.registry, request_iface, context_iface, view_name)
        if views:
            view = views[0]
        else:
            view = None
    else:
        view = RoutesMultiView(infos, context_iface, root_factory, request)
    if (view is None):
        views = _find_views(request.registry, request_iface, context_iface, '')
        if views:
            view = views[0]
        else:
            view = None
        if IMultiView.providedBy(view):
            view = None
    if (view is not None):
        view.__request_attrs__ = attrs
    return view
