from bs4 import BeautifulSoup


def get_checksums_location(base_url: str, response_content: bytes) -> str:
    """Generates the href to the checksum file.

    Args:
        base_url (str): The base url for the language to download.
        response_content (bytes): The content of the response which logged in to the base_url.

    Returns:
        str: The link for the checksum file.
    """
    soup = BeautifulSoup(response_content, "html5lib")
    checksum_file = [
        "/".join([base_url, link["href"]])
        for link in soup.find_all("a", href=True)
        if "sha256.txt" in link["href"] or "checksum.sha256" in link["href"]
    ][0]
    return checksum_file