def METHOD_NAME(url: str, signed_nonce: str, nonce: str, data: str) -> str:
    """Request signature based on url, signed_nonce, nonce and data."""
    sign = "&".join([url, signed_nonce, nonce, "data=" + data])
    signature = hmac.new(
        key=base64.b64decode(signed_nonce), msg=sign.encode(), digestmod=hashlib.sha256
    ).digest()
    return base64.b64encode(signature).decode()