def strip_uri_proto(uri, proto):
    """
    Remove the protocol prefix in a URI. Turns
        fs:///foo/bar
    into
        /foo/bar
    """
    if uri.startswith(proto):
        stripped = uri[len(proto):]
        assert stripped.startswith('/'),\
            "Relative path in proto-prefixed URI : %s" % uri
        return stripped
    else:
        return uri