'Called when at a non-leaf value. Should recurse and yield values.'

def _AtNonLeaf(self, attr_value, path):

    try:
        if isinstance(attr_value, collections.Mapping):
            sub_obj = attr_value.get(path[1])
            if (len(path) > 2):
                sub_obj = self.Expand(sub_obj, path[2:])
            if isinstance(sub_obj, basestring):
                (yield sub_obj)
            elif isinstance(sub_obj, collections.Mapping):
                for (k, v) in sub_obj.items():
                    (yield {k: v})
            else:
                for value in sub_obj:
                    (yield value)
        else:
            for sub_obj in attr_value:
                for value in self.Expand(sub_obj, path[1:]):
                    (yield value)
    except TypeError:
        for value in self.Expand(attr_value, path[1:]):
            (yield value)
