<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def iteritems_breadth_first(a_mapping, include_dicts=False):
 """a generator that returns all the keys in a set of nested Mapping instances. The keys take the form X.Y.Z"""

    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