def url(self, context) -> str:
    url_to_asset = super().url(context)
    parsed_url = urlparse(url_to_asset)
    assert parsed_url.path
    if is_absolute_uri(parsed_url):
        return url_to_asset
    path_and_file = to_pf_url(parsed_url)
    return context['request'].build_absolute_uri(path_and_file)
def url(self, context) -> str:
    url_to_asset = super().url(context)
    parsed_url = urlparse(url_to_asset)
    assert parsed_url.path
    if is_absolute_uri(parsed_url):
        return url_to_asset
    path_and_file = to_pf_url(parsed_url)
    return context['request'].build_absolute_uri(path_and_file)