code: def box(text):
      r
      lines = text.split('\n')
  
      width = max(len(l) for l in lines)
      top_bar = (TOP_LEFT_CORNER + HORIZONTAL_BAR * (2 + width) +
                 TOP_RIGHT_CORNER)
      bottom_bar = (BOTTOM_LEFT_CORNER + HORIZONTAL_BAR * (2 + width) +
                    BOTTOM_RIGHT_CORNER)
  
      lines = [LINES_FORMAT_STR.format(line=line, width=width) for line in lines]
  
      return top_bar + '\n' + '\n'.join(lines) + '\n' + bottom_bar
docs: r"""Wrap a chunk of text in a box.
  
      Example:
          >>> print(box('line1\nline2'))
          ┌───────┐
          │ line1 │
          │ line2 │
          └───────┘