def truncate_arg(arg, max_len=100):
    """ Truncate the given argument if the length is too large. """
    if isinstance(arg, str) and len(arg) > max_len:
        return arg[:max_len] + "..."

    return arg