def trunc_name(text: str, max_len: int = 10) -> str:
    """Shortens the name to match the `max_len`
    through adding `...`."""

    # Check if it meets the criteria
    if t_len := len(text) <= max_len:
        return text
    
    return text[:max_len-3] + "..."