Translate `keywords` to full keyword records as they are used in Aleph.

    Returns tuple with three lists, each of which is later used in different
    part of the MRC/MARC record.

    Args:
        keywords (list): List of keyword strings.

    Returns:
        tuple: (mdt_list, cz_keyword_list, en_keyword_list)

def compile_keywords(keywords):
    """
    Translate `keywords` to full keyword records as they are used in Aleph.

    Returns tuple with three lists, each of which is later used in different
    part of the MRC/MARC record.

    Args:
        keywords (list): List of keyword strings.

    Returns:
        tuple: (mdt_list, cz_keyword_list, en_keyword_list)
    """
    mdt = []
    cz_keywords = []
    en_keywords = []
    for keyword in keywords:
        keyword = keyword_to_info(keyword.encode("utf-8"))

        if not keyword:
            continue

        cz_keywords.append({
            "uid": keyword["uid"],
            "zahlavi": keyword["zahlavi"],
            "zdroj": "czenas",
        })

        if keyword.get("mdt"):
            mdt.append({
                "mdt": keyword["mdt"],
                "mrf": keyword["mrf"],
            })

        angl_ekvivalent = keyword.get("angl_ekvivalent")
        if angl_ekvivalent:
            en_keywords.append({
                "zahlavi": angl_ekvivalent,
                "zdroj": keyword.get("zdroj_angl_ekvivalentu") or "eczenas",
            })

    return mdt, cz_keywords, en_keywords