class_docstr: A singleton application with full configuration support.
class_docstr_tok: ["A","singleton","application","with","full","configuration","support","."]
docstr: Yields only classes with own traits, and their subclasses.
  
  Thus, produced sample config-file will contain all classes
  on which a trait-value may be overridden:
  
  - either on the class owning the trait,
  - or on its subclasses, even if those subclasses do not define
    any traits themselves.
code: def _classes_in_config_sample(self):
      """
      Yields only classes with own traits, and their subclasses.
  
      Thus, produced sample config-file will contain all classes
      on which a trait-value may be overridden:
  
      - either on the class owning the trait,
      - or on its subclasses, even if those subclasses do not define
        any traits themselves.
      """
      cls_to_config = OrderedDict(
          (cls, bool(cls.class_own_traits(config=True)))
          for cls in self._classes_inc_parents()
      )
  
      def is_any_parent_included(cls):
          return any(
              b in cls_to_config and cls_to_config[b]
              for b in cls.__bases__
          )
  
      ## Mark "empty" classes for inclusion if their parents own-traits,
      #  and loop until no more classes gets marked.
      #
      while True:
          to_incl_orig = cls_to_config.copy()
          cls_to_config = OrderedDict(
              (cls, inc_yes or is_any_parent_included(cls))
              for cls, inc_yes in cls_to_config.items()
          )
          if cls_to_config == to_incl_orig:
              break
      for cl, inc_yes in cls_to_config.items():
          if inc_yes:
              yield cl
  
imports: from __future__ import print_function
  from copy import deepcopy
  import json
  import logging
  import os
  import re
  import sys
  from collections import defaultdict, OrderedDict
  from decorator import decorator
  from traitlets.config.configurable import Configurable, SingletonConfigurable
  from traitlets.config.loader import KVArgParseConfigLoader, PyFileConfigLoader, Config, ArgumentError, ConfigFileNotFound, JSONFileConfigLoader
  from traitlets.traitlets import Bool, Unicode, List, Enum, Dict, Instance, TraitError, observe, observe_compat, default
  from ipython_genutils.importstring import import_item
  from ipython_genutils.text import indent, wrap_paragraphs, dedent
  from ipython_genutils import py3compat
  import six
label_desc: Use image node_id 25 for calling the Application obj's underlying member method code with example usage: obj._classes_in_config_sample() and returns: any