def shorten_str(s: str, maxlen: int=32):
    """
    If `s` is longer than `maxlen`, shorten it to at mos maxlen using `'...'`.
    """
    if len(s) > maxlen:
        s = s[:maxlen - 3] + '...'
    return s
