code: def packtext(text, width=80):
      r
      import utool as ut
      import textwrap
      new_text = '\n'.join(textwrap.wrap(text, width))
      new_text = ut.remove_doublspaces(new_text).strip()
      return new_text
docs: r"""
      Args:
          text (str):
  
      CommandLine:
          python -m utool.util_str --exec-pack_paragraph --show
  
      Example:
          >>> # DISABLE_DOCTEST
          >>> from utool.util_str import *  # NOQA
          >>> import utool as ut
          >>> width = 80
          >>> text = lorium_ipsum()
          >>> result = packtext(text)
          >>> print(result)