class_docstr: [Deprecated]
  
  Create margin that displays a prompt.
  This can display one prompt at the first line, and a continuation prompt
  (e.g, just dots) on all the following lines.
  
  This `PromptMargin` implementation has been largely superseded in favor of
  the `get_line_prefix` attribute of `Window`. The reason is that a margin is
  always a fixed width, while `get_line_prefix` can return a variable width
  prefix in front of every line, making it more powerful, especially for line
  continuations.
  
  :param get_prompt: Callable returns formatted text or a list of
      `(style_str, type)` tuples to be shown as the prompt at the first line.
  :param get_continuation: Callable that takes three inputs. The width (int),
      line_number (int), and is_soft_wrap (bool). It should return formatted
      text or a list of `(style_str, type)` tuples for the next lines of the
      input.
class_docstr_tok: ["[","Deprecated","]","Create","margin","that","displays","a","prompt",".","This","can","display","one","prompt","at","the","first","line",",","and","a","continuation","prompt","(","e.g",",","just","dots",")","on","all","the","following","lines",".","This","`","PromptMargin","`","implementation","has","been","largely","superseded","in","favor","of","the","`","get_line_prefix","`","attribute","of","`","Window","`",".","The","reason","is","that","a","margin","is","always","a","fixed","width",",","while","`","get_line_prefix","`","can","return","a","variable","width","prefix","in","front","of","every","line",",","making","it","more","powerful",",","especially","for","line","continuations",".",":","param","get_prompt",":","Callable","returns","formatted","text","or","a","list","of","`","(","style_str",",","type",")","`","tuples","to","be","shown","as","the","prompt","at","the","first","line",".",":","param","get_continuation",":","Callable","that","takes","three","inputs",".","The","width","(","int",")",",","line_number","(","int",")",",","and","is_soft_wrap","(","bool",")",".","It","should","return","formatted","text","or","a","list","of","`","(","style_str",",","type",")","`","tuples","for","the","next","lines","of","the","input","."]
code: def create_margin(
      self,
      window_render_info: WindowRenderInfo,
      width: int,
      height: int,
  ) -> StyleAndTextTuples:
      get_continuation = self.get_continuation
      result: StyleAndTextTuples = []
  
      # First line.
      result.extend(to_formatted_text(self.get_prompt()))
  
      # Next lines.
      if get_continuation:
          last_y = None
  
          for y in window_render_info.displayed_lines[1:]:
              result.append(("", "\n"))
              result.extend(
                  to_formatted_text(
                      get_continuation(width, y, y == last_y)
                  )
              )
              last_y = y
  
      return result
  
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 3 for calling the PromptMargin obj's underlying member method code with example usage: obj.create_margin(window_render_info, width, height) and returns: result