code: def iteritems_breadth_first(a_mapping, include_dicts=False):
      
      subordinate_mappings = []
      for key, value in six.iteritems(a_mapping):
          if isinstance(value, collections.Mapping):
              subordinate_mappings.append((key, value))
              if include_dicts:
                  yield key, value
          else:
              yield key, value
      for key, a_map in subordinate_mappings:
          for sub_key, value in iteritems_breadth_first(a_map, include_dicts):
              yield '%s.%s' % (key, sub_key), value
docs: a generator that returns all the keys in a set of nested
      Mapping instances.  The keys take the form X.Y.Z