docs: def _pretty_print(key_val, sep=': ', min_col_width=39, text_width=None):
      """Print a iterable of key/values
  
      Args:
          key_val (list of (str, str)): the pairs of section names and text.
          sep (str): separator between section names and text.
          min_col_width (int): minimal acceptable column width
          text_width (int): text width to use. If set to None, will try to infer
              the size of the terminal.
      """
      if text_width is None:
          text_width = get_terminal_size().columns
      if text_width < min_col_width:
          min_col_width = text_width
      ncols = (text_width + 1) // (min_col_width + 1)
      colw = (text_width + 1) // ncols - 1
      ncols = min(ncols, len(key_val))
  
      wrapper = TextWrapper(width=colw)
      lines = []
      for key, val in key_val:
          if len(key) + len(sep) >= colw // 2:
              wrapper.subsequent_indent = ' '
          else:
              wrapper.subsequent_indent = ' ' * (len(key) + len(sep))
          lines.extend(wrapper.wrap('{}{}{}'.format(key, sep, val)))
  
      chunks = []
      for rem_col in range(ncols, 1, -1):
          isep = ceil(len(lines) / rem_col)
          while isep < len(lines) and lines[isep][0] == ' ':
              isep += 1
          chunks.append(lines[:isep])
          lines = lines[isep:]
      chunks.append(lines)
      lines = zip_longest(*chunks, fillvalue='')
  
      fmt = '|'.join(['{{:{}}}'.format(colw)] * (ncols - 1))
      fmt += '|{}' if ncols > 1 else '{}'
      print(*(fmt.format(*line) for line in lines), sep='\n')