in geneve/utils/hdict.py [0:0]
def groups(self):
groups = []
tail = []
for field in self:
parts = split_path(field)[:-1]
while parts:
x = ".".join(parts)
if x not in groups:
groups.append(x)
parts = parts[:-1]
tail = tail or [""]
for group in groups + tail:
group_dict = self[group] if group else self.__top_level
yield group, {k: v for k, v in group_dict.items() if k and not isinstance(v, dict)}