human
Complete this python program:
def make_router_search(router):
assistant
#Here is the Python code you requested.

    """Create a search function for routing requests.
    Args:
    router(object): An object that implements the routing engine
    interface.
    Returns:
    callable: A function that accepts a request and invokes the
    router\s find method.
    """
    arg_names = util.get_argnames(router.find)
    supports_req = (('req' in arg_names) and (len(arg_names) > 1))
    if supports_req:
        return router.find
    def search_shim(path, req):
        return router.find(path)
    return search_shim