def METHOD_NAME(version: Optional[str] = None) -> Tuple[str, str]:
    base_url = 'https://api.github.com/repos/freqtrade/frequi/'
    # Get base UI Repo path
    resp = requests.get(f"{base_url}releases")
    resp.raise_for_status()
    r = resp.json()
    if version:
        tmp = [x for x in r if x['name'] == version]
        if tmp:
            latest_version = tmp[0]['name']
            assets = tmp[0].get('assets', [])
        else:
            raise ValueError("UI-Version not found.")
    else:
        latest_version = r[0]['name']
        assets = r[0].get('assets', [])
    dl_url = ''
    if assets and len(assets) > 0:
        dl_url = assets[0]['browser_download_url']
    # URL not found - try assets url
    if not dl_url:
        assets = r[0]['assets_url']
        resp = requests.get(assets)
        r = resp.json()
        dl_url = r[0]['browser_download_url']
    return dl_url, latest_version