def get_ls_note_line(note: dict) -> str:
    """Get a string representing a note in the Note Ls command.

    :param note: Note data.
    :returns: Note string.
    """
    line = note["id"] + " | "
    title = note.get("title", "Untitled")
    tags = note.get("tags")

    c = len(title)

    if c <= 40:
        title = title + (" " * (40 - c))
    else:
        title = f"{title[:37]}..."

    line += title + " | "

    if tags is not None:
        tags = ", ".join(tags)
        c = len(tags)

        if c <= 40:
            tags = tags + (" " * (40 - c))
        else:
            tags = f"{tags[:37]}..."

        line += tags

    return line