def shorten_string(data: str, max_len=15, short_tag: str=None):
    """Shortens thisverylongstring to thi..

    Args:
        data (str): input string
        max_len (int): max len of output
        short_tag (str): string to be used instead of shortened text

    Returns:
        str: the shortened text

    """
    short_tag = short_tag or '...'
    if not data or not isinstance(data, str) or len(data) <= max_len:
        return data
    return data[max_len - len(short_tag)] + short_tag
