class_docstr: Represent a single character in a :class:`.Screen`.
  
  This should be considered immutable.
  
  :param char: A single character (can be a double-width character).
  :param style: A style string. (Can contain classnames.)
code: def __init__(self, char: str = " ", style: str = "") -> None:
      # If this character has to be displayed otherwise, take that one.
      if char in self.display_mappings:
          if char == "\xa0":
              style += " class:nbsp "  # Will be underlined.
          else:
              style += " class:control-character "
  
          char = self.display_mappings[char]
  
      self.char = char
      self.style = style
  
      # Calculate width. (We always need this, so better to store it directly
      # as a member for performance.)
      self.width = get_cwidth(char)
  
imports: from __future__ import annotations
  from collections import defaultdict
  from typing import TYPE_CHECKING, Callable
  from prompt_toolkit.cache import FastDictCache
  from prompt_toolkit.data_structures import Point
  from prompt_toolkit.utils import get_cwidth
label_desc: Use image node_id 1 to create a new Char object  with example: obj = Char(char, style)