'Searches routes for a matching responder.
Args:
req: The request object.
Returns:
tuple: A 3-member tuple consisting of a responder callable,
a ``dict`` containing parsed path fields (if any were specified in
the matching route\'s URI template), and a reference to the
responder\'s resource instance.
Note:
If a responder was matched to the given URI, but the HTTP
method was not found in the method_map for the responder,
the responder callable element of the returned tuple will be
`falcon.responder.bad_request`.
Likewise, if no responder was matched for the given URI, then
the responder callable element of the returned tuple will be
`falcon.responder.path_not_found`'

def _get_responder(self, req):

    path = req.path
    method = req.method
    uri_template = None
    route = self._router_search(path, req=req)
    if (route is not None):
        try:
            (resource, method_map, params, uri_template) = route
        except ValueError:
            (resource, method_map, params) = route
    else:
        resource = None
    if (resource is not None):
        try:
            responder = method_map[method]
        except KeyError:
            responder = falcon.responders.bad_request
    else:
        params = {}
        for (pattern, sink) in self._sinks:
            m = pattern.match(path)
            if m:
                params = m.groupdict()
                responder = sink
                break
        else:
            responder = falcon.responders.path_not_found
    return (responder, params, resource, uri_template)
