def find_edges(states, relname):
    try:
        deps = find(states, relname)
        for dep in deps:
            for dep_type, dep_name in dep.items():
                yield make_node_name(dep_type, dep_name)
    except AttributeError as e:
        sys.stderr.write("Bad state: {0}\n".format(str(states)))
        raise e
Use find() to recursively find objects at keys matching
dataset/ETHPy150Open ceralena/salt-state-graph/salt_state_graph/__init__.py/find_edges