def shorten_text(text, max_len=400, show_more_text=""):
    """
    Shorten a body of text.
        text - the string to be shortened, or self if not long enough
        max_len - maximum length in characters of text body
        show_more_text - the string that will be attached to end of text IF trim
    """
    if text == None:
        return None

    cutoff_string = "... "

    shorter = None
    if len(text) > max_len + len(cutoff_string):
        shorter = text[:max_len] + cutoff_string + show_more_text

    return shorter or text