class_docstr: Completion menu that displays all the completions in several columns.
  When there are more completions than space for them to be displayed, an
  arrow is shown on the left or right side.
  
  `min_rows` indicates how many rows will be available in any possible case.
  When this is larger than one, it will try to use less columns and more
  rows until this value is reached.
  Be careful passing in a too big value, if less than the given amount of
  rows are available, more columns would have been required, but
  `preferred_width` doesn't know about that and reports a too small value.
  This results in less completions displayed and additional scrolling.
  (It's a limitation of how the layout engine currently works: first the
  widths are calculated, then the heights.)
  
  :param suggested_max_column_width: The suggested max width of a column.
      The column can still be bigger than this, but if there is place for two
      columns of this width, we will display two columns. This to avoid that
      if there is one very wide completion, that it doesn't significantly
      reduce the amount of columns.
class_docstr_tok: ["Completion","menu","that","displays","all","the","completions","in","several","columns",".","When","there","are","more","completions","than","space","for","them","to","be","displayed",",","an","arrow","is","shown","on","the","left","or","right","side",".","`","min_rows","`","indicates","how","many","rows","will","be","available","in","any","possible","case",".","When","this","is","larger","than","one",",","it","will","try","to","use","less","columns","and","more","rows","until","this","value","is","reached",".","Be","careful","passing","in","a","too","big","value",",","if","less","than","the","given","amount","of","rows","are","available",",","more","columns","would","have","been","required",",","but","`","preferred_width","`","does","n't","know","about","that","and","reports","a","too","small","value",".","This","results","in","less","completions","displayed","and","additional","scrolling",".","(","It","'s","a","limitation","of","how","the","layout","engine","currently","works",":","first","the","widths","are","calculated",",","then","the","heights",".",")",":","param","suggested_max_column_width",":","The","suggested","max","width","of","a","column",".","The","column","can","still","be","bigger","than","this",",","but","if","there","is","place","for","two","columns","of","this","width",",","we","will","display","two","columns",".","This","to","avoid","that","if","there","is","one","very","wide","completion",",","that","it","does","n't","significantly","reduce","the","amount","of","columns","."]
docstr: Return the width of each column.
code: def _get_column_width(self, completion_state: CompletionState) -> int:
      """
      Return the width of each column.
      """
      try:
          count, width = self._column_width_for_completion_state[
              completion_state
          ]
          if count != len(completion_state.completions):
              # Number of completions changed, recompute.
              raise KeyError
          return width
      except KeyError:
          result = (
              max(
                  get_cwidth(c.display_text)
                  for c in completion_state.completions
              )
              + 1
          )
          self._column_width_for_completion_state[completion_state] = (
              len(completion_state.completions),
              result,
          )
          return result
  
imports: from __future__ import annotations
  import math
  from itertools import zip_longest
  from typing import TYPE_CHECKING, Callable, Iterable, Sequence, TypeVar, cast
  from weakref import WeakKeyDictionary
  from prompt_toolkit.application.current import get_app
  from prompt_toolkit.buffer import CompletionState
  from prompt_toolkit.completion import Completion
  from prompt_toolkit.data_structures import Point
  from prompt_toolkit.filters import Condition, FilterOrBool, has_completions, is_done, to_filter
  from prompt_toolkit.formatted_text import StyleAndTextTuples, fragment_list_width, to_formatted_text
  from prompt_toolkit.key_binding.key_processor import KeyPressEvent
  from prompt_toolkit.layout.utils import explode_text_fragments
  from prompt_toolkit.mouse_events import MouseEvent, MouseEventType
  from prompt_toolkit.utils import get_cwidth
  from .containers import ConditionalContainer, HSplit, ScrollOffsets, Window
  from .controls import GetLinePrefixCallable, UIContent, UIControl
  from .dimension import Dimension
  from .margins import ScrollbarMargin
label_desc: Use image node_id 7 for calling the MultiColumnCompletionMenuControl obj's underlying member method code with example usage: obj._get_column_width(completion_state) and returns: width, result