class_docstr: A node in a repr tree. May be atomic or a container.
class_docstr_tok: ["A","node","in","a","repr","tree",".","May","be","atomic","or","a","container","."]
docstr: Generate tokens for this node.
docstr_tok: ["Generate","tokens","for","this","node","."]
code: def iter_tokens(self) -> Iterable[str]:
      """Generate tokens for this node."""
      if self.key_repr:
          yield self.key_repr
          yield self.key_separator
      if self.value_repr:
          yield self.value_repr
      elif self.children is not None:
          if self.children:
              yield self.open_brace
              if (
                  self.is_tuple
                  and not self.is_namedtuple
                  and len(self.children) == 1
              ):
                  yield from self.children[0].iter_tokens()
                  yield ","
              else:
                  for child in self.children:
                      yield from child.iter_tokens()
                      if not child.last:
                          yield self.separator
              yield self.close_brace
          else:
              yield self.empty
  
imports: import builtins
  import collections
  import dataclasses
  import inspect
  import os
  import sys
  from array import array
  from collections import Counter, UserDict, UserList, defaultdict, deque
  from dataclasses import dataclass, fields, is_dataclass
  from inspect import isclass
  from itertools import islice
  from types import MappingProxyType
  from typing import TYPE_CHECKING, Any, Callable, DefaultDict, Dict, Iterable, List, Optional, Sequence, Set, Tuple, Union
  from rich.repr import RichReprResult
  from .None import get_console
  from ._loop import loop_last
  from ._pick import pick_bool
  from .abc import RichRenderable
  from .cells import cell_len
  from .highlighter import ReprHighlighter
  from .jupyter import JupyterMixin, JupyterRenderable
  from .measure import Measurement
  from .text import Text
label_desc: Use image node_id 1 for calling the Node obj's underlying member method code with example usage: obj.iter_tokens() without return types