code: def truncate(text, length=50, ellipsis='...'):
      
      text = nativestring(text)
      return text[:length] + (text[length:] and ellipsis)
docs: Returns a truncated version of the inputted text.
  
      :param      text | <str>
                  length | <int>
                  ellipsis | <str>
  
      :return     <str>