import requests


def get_latest_ensembl_release() -> str:
    """Return the latest Ensembl release as provided by bioversions."""

    url = "https://github.com/biopragmatics/bioversions/raw/main/src/bioversions/resources/versions.json"
    results = requests.get(url).json()
    versions = {
        entry["prefix"]: entry["releases"][-1]["version"]
        for entry in results["database"]
        if "prefix" in entry
    }
    ensembl_release = versions["ensembl"]
    assert isinstance(ensembl_release, str)
    return ensembl_release