class_docstr: Helper for drawing the complete menu to the screen.
  
  :param scroll_offset: Number (integer) representing the preferred amount of
      completions to be displayed before and after the current one. When this
      is a very high number, the current completion will be shown in the
      middle most of the time.
class_docstr_tok: ["Helper","for","drawing","the","complete","menu","to","the","screen",".",":","param","scroll_offset",":","Number","(","integer",")","representing","the","preferred","amount","of","completions","to","be","displayed","before","and","after","the","current","one",".","When","this","is","a","very","high","number",",","the","current","completion","will","be","shown","in","the","middle","most","of","the","time","."]
docstr: Create a UIContent object for this control.
docstr_tok: ["Create","a","UIContent","object","for","this","control","."]
code: def create_content(self, cli, width, height):
      """
      Create a UIContent object for this control.
      """
      complete_state = cli.current_buffer.complete_state
      if complete_state:
          completions = complete_state.current_completions
          index = complete_state.complete_index  # Can be None!
  
          # Calculate width of completions menu.
          menu_width = self._get_menu_width(width, complete_state)
          menu_meta_width = self._get_menu_meta_width(
              width - menu_width, complete_state
          )
          show_meta = self._show_meta(complete_state)
  
          def get_line(i):
              c = completions[i]
              is_current_completion = i == index
              result = self._get_menu_item_tokens(
                  c, is_current_completion, menu_width
              )
  
              if show_meta:
                  result += self._get_menu_item_meta_tokens(
                      c, is_current_completion, menu_meta_width
                  )
              return result
  
          return UIContent(
              get_line=get_line,
              cursor_position=Point(x=0, y=index or 0),
              line_count=len(completions),
              default_char=Char(" ", self.token),
          )
  
      return UIContent()
  
imports: from __future__ import unicode_literals
  from six.moves import zip_longest, range
  from prompt_toolkit.filters import HasCompletions, IsDone, Condition, to_cli_filter
  from prompt_toolkit.mouse_events import MouseEventType
  from prompt_toolkit.token import Token
  from prompt_toolkit.utils import get_cwidth
  from .containers import Window, HSplit, ConditionalContainer, ScrollOffsets
  from .controls import UIControl, UIContent
  from .dimension import LayoutDimension
  from .margins import ScrollbarMargin
  from .screen import Point, Char
  import math
label_desc: Use image node_id 5 for calling the CompletionsMenuControl obj's underlying member method code with example usage: obj.create_content(cli, width, height) and returns: UIContent, UIContent, result