def get_proper_str(str_option, end=False, size=43):
    """
    Method to shorten a string into the proper size for display

    :param str_option: string to shorten
    :param end: keep the end of the string visible (default beginning)
    :return: shortened string
    """
    if len(str_option) > size:
        if end:
            return '...%s' % str_option[-(size - 3):]
        else:
            return '%s...' % str_option[:size - 3]
    else:
        return str_option
