def wrap(string: str, width: int = 70) -> str:
  """Returns the string wrapped to the specified width."""
  lines = string.split('\n')
  wrapped_lines = (textwrap.fill(line, width=width) for line in lines)
  return '\n'.join(wrapped_lines)
Returns the string wrapped to the specified width.
concordia/utils/text.py