def METHOD_NAME(self, url, nginx_path):
    """Return the URL from which the PDF viewer should load the PDF."""
    # Compute the expiry time to put into the URL.
    exp = int(quantized_expiry(max_age=timedelta(hours=25)).timestamp())
    # The expression to be hashed.
    #
    # This matches the hash expression that we tell the NGINX secure link
    # module to use with the secure_link_md5 setting in our NGINX config file.
    #
    # http://nginx.org/en/docs/http/ngx_http_secure_link_module.html#secure_link_md5
    hash_expression = f"{nginx_path}{exp}/{url} {self.secret}"
    # Compute the hash value to put into the URL.
    #
    # This implements the NGINX secure link module's hashing algorithm:
    #
    # http://nginx.org/en/docs/http/ngx_http_secure_link_module.html#secure_link_md5
    hash_ = hashlib.md5()
    hash_.update(hash_expression.encode("utf-8"))
    sec = hash_.digest()
    sec = b64encode(sec)
    sec = sec.replace(b"+", b"-")
    sec = sec.replace(b"/", b"_")
    sec = sec.replace(b"=", b"")
    sec = sec.decode()
    # Construct the URL, inserting sec and exp where our NGINX config file
    # expects to find them.
    return f"{self.nginx_server}{nginx_path}{sec}/{exp}/{url}"