def get_known_node_packs():
    """Return list with custom-formatted references to known node packs."""

    try:
        known_packs_data = load_pyl(KNOWN_PACKS_FILE)

    except FileNotFoundError:

        known_packs_data = {
            LOCAL_REFS_KEY: [],
            INSTALLED_REFS_KEY: {},
        }

        save_pyl(known_packs_data, KNOWN_PACKS_FILE)

    installed_packs_refs = sorted(
        f"installed : {item}"
        for item in known_packs_data[INSTALLED_REFS_KEY].get(executable, [])
    )

    local_packs_refs = sorted(
        (f"local : {item}" for item in known_packs_data[LOCAL_REFS_KEY]),
        key=lambda string: Path(string.split(":")[1]).name,
    )

    return local_packs_refs + installed_packs_refs
Return list with custom-formatted references to known node packs.
nodezator/knownpacks.py