class_docstr: Wrapper around other :class:`.Margin` classes to show/hide them.
class_docstr_tok: ["Wrapper","around","other",":","class",":","`",".Margin","`","classes","to","show\/hide","them","."]
code: def get_width(self, get_ui_content: Callable[[], UIContent]) -> int:
      if self.filter():
          return self.margin.get_width(get_ui_content)
      else:
          return 0
  
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 ConditionalMargin obj's underlying member method code with example usage: obj.get_width(get_ui_content) and returns: self, int