parameters: (text, maxlen)
return_statement: return text
docstring: Omit part of a string if needed to make it fit in a maximum length.
docstring_summary: Omit part of a string if needed to make it fit in a maximum length.
docstring_tokens: Omit part of a string if needed to make it fit in a maximum length .
function: def cram(text, maxlen):
      """Omit part of a string if needed to make it fit in a maximum length."""
      if len(text) > maxlen:
          pre = max(0, (maxlen-3)//2)
          post = max(0, maxlen-3-pre)
          return text[:pre] + '...' + text[len(text)-post:]
      return text
function_tokens: def cram ( text , maxlen ) : if len ( text ) > maxlen : pre = max ( 0 , ( maxlen - 3 ) // 2 ) post = max ( 0 , maxlen - 3 - pre ) return text [ : pre ] + '...' + text [ len ( text ) - post : ] return text