class_docstr: Margin that displays the line numbers.
  
  :param relative: Number relative to the cursor position. Similar to the Vi
                   'relativenumber' option.
  :param display_tildes: Display tildes after the end of the document, just
      like Vi does.
class_docstr_tok: ["Margin","that","displays","the","line","numbers",".",":","param","relative",":","Number","relative","to","the","cursor","position",".","Similar","to","the","Vi","'relativenumber","'","option",".",":","param","display_tildes",":","Display","tildes","after","the","end","of","the","document",",","just","like","Vi","does","."]
code: def get_width(self, get_ui_content: Callable[[], UIContent]) -> int:
      line_count = get_ui_content().line_count
      return max(3, len("%s" % line_count) + 1)
  
imports: from __future__ import annotations
  from abc import ABCMeta, abstractmethod
  from typing import TYPE_CHECKING, Callable
  from prompt_toolkit.filters import FilterOrBool, to_filter
  from prompt_toolkit.formatted_text import StyleAndTextTuples, fragment_list_to_text, to_formatted_text
  from prompt_toolkit.utils import get_cwidth
  from .controls import UIContent
label_desc: Use image node_id 2 for calling the NumberedMargin obj's underlying member method code with example usage: obj.get_width(get_ui_content) and returns: max