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

        namespaces = []
        for key in self._key_order:
            if isinstance(getattr(self, key), DotDict):
                namespaces.append(key)
                if include_dicts:
                    yield key
            else:
                yield key
        for a_namespace in namespaces:
            for key in self[a_namespace].keys_breadth_first(include_dicts):
                yield '%s.%s' % (a_namespace, key)