def truncate(string: str, length: int) -> str: return string[: length - 2] + ".." if len(string) > 52 else string