code: def _write_wrapped(self, line, sep=" ", indent="", width=78):
          
  
          words = line.split(sep)
          lines = []
          line  = ""
          buf   = []
  
          while len(words):
              buf.append(words.pop(0))
              line = sep.join(buf)
              if len(line) > width:
                  # Need to word wrap!
                  words.insert(0, buf.pop())  # Undo
                  lines.append(sep.join(buf))
                  buf = []
                  line = ""
  
          # Straggler?
          if line:
              lines.append(line)
  
          # Returned output
          result = lines.pop(0)
          if len(lines):
              eol = ""
              if sep == " ":
                  eol = "\s"
              for item in lines:
                  result += eol + "\n" + indent + "^ " + item
  
          return result
docs: Word-wrap a line of RiveScript code for being written to a file.
  
          :param str line: The original line of text to word-wrap.
          :param str sep: The word separator.
          :param str indent: The indentation to use (as a set of spaces).
          :param int width: The character width to constrain each line to.
  
          :return str: The reformatted line(s).