def resolve_url(url, prefixes):
    """Resolve the urls of form 'prefix:name'"""
    if ':' in url:
        prefix, _, tail = url.partition(':')
        if prefix in prefixes:
            return prefixes[prefix] + tail
    return url
