def _word_wrap_at_column(words, width):
  """Wraps words to the specified width, and returns a list of wrapped lines."""
  result = []
  in_progress = []
  for word in words:
    if len(" ".join(in_progress + [word])) > width:
      result.append(" ".join(in_progress))
      assert len(result[-1]) <= width
      in_progress = []
    in_progress.append(word)
  result.append(" ".join(in_progress))
  assert len(result[-1]) <= width
  return result