code: def _all_dicts(bases, seen=None):
      
      if seen is None:
          seen = set()
      for cls in bases:
          if cls in seen:
              continue
          seen.add(cls)
          yield cls.__dict__
          for b in _all_dicts(cls.__bases__, seen):
              yield b
docs: Yield each class in ``bases`` and each of their base classes.