def remove_handler(selector, path):
    """
    Remove an existing path handler in the selector
    map. This disables that route, and will cause a
    404 to be returned for that path.
    """
    for index, (regex, _) in enumerate(selector.mappings):
        if regex.match(path) is not None:
            del selector.mappings[index]
