class_docstr: Holds leaves and comments. Can be printed with `str(line)`.
class_docstr_tok: ["Holds","leaves","and","comments",".","Can","be","printed","with","`","str","(","line",")","`","."]
docstr: Add a new `leaf` to the end of the line.
  
  Unless `preformatted` is True, the `leaf` will receive a new consistent
  whitespace prefix and metadata applied by :class:`BracketTracker`.
  Trailing commas are maybe removed, unpacked for loop variables are
  demoted from being delimiters.
  
  Inline comments are put aside.
code: def append(
      self,
      leaf: Leaf,
      preformatted: bool = False,
      track_bracket: bool = False,
  ) -> None:
      """Add a new `leaf` to the end of the line.
  
      Unless `preformatted` is True, the `leaf` will receive a new consistent
      whitespace prefix and metadata applied by :class:`BracketTracker`.
      Trailing commas are maybe removed, unpacked for loop variables are
      demoted from being delimiters.
  
      Inline comments are put aside.
      """
      has_value = leaf.type in BRACKETS or bool(leaf.value.strip())
      if not has_value:
          return
  
      if token.COLON == leaf.type and self.is_class_paren_empty:
          del self.leaves[-2:]
      if self.leaves and not preformatted:
          # Note: at this point leaf.prefix should be empty except for
          # imports, for which we only preserve newlines.
          leaf.prefix += whitespace(
              leaf,
              complex_subscript=self.is_complex_subscript(leaf),
              mode=self.mode,
          )
      if self.inside_brackets or not preformatted or track_bracket:
          self.bracket_tracker.mark(leaf)
          if self.mode.magic_trailing_comma:
              if self.has_magic_trailing_comma(leaf):
                  self.magic_trailing_comma = leaf
          elif self.has_magic_trailing_comma(leaf):
              self.remove_trailing_comma()
      if not self.append_comment(leaf):
          self.leaves.append(leaf)
  
imports: import itertools
  import math
  from dataclasses import dataclass, field
  from typing import Callable, Dict, Iterator, List, Optional, Sequence, Tuple, TypeVar, Union, cast
  from black.brackets import COMMA_PRIORITY, DOT_PRIORITY, BracketTracker
  from black.mode import Mode, Preview
  from black.nodes import BRACKETS, CLOSING_BRACKETS, OPENING_BRACKETS, STANDALONE_COMMENT, TEST_DESCENDANTS, child_towards, is_docstring, is_import, is_multiline_string, is_one_sequence_between, is_type_comment, is_type_ignore_comment, is_with_or_async_with_stmt, make_simple_prefix, replace_child, syms, whitespace
  from black.strings import str_width
  from blib2to3.pgen2 import token
  from blib2to3.pytree import Leaf, Node
label_desc: Use image node_id 1 for calling the Line obj's underlying member method code with example usage: obj.append(leaf, preformatted, track_bracket) without return types