def METHOD_NAME(s: str, n: int) -> str:
    """Return s truncated to n characters."""
    if len(s) <= n:
        return s
    s2 = s[: n - 3] + f"...({len(s)})"
    return s2 + '\n' if s.endswith('\n') else s2