(structure)
| 142 | return node_id |
| 143 | |
| 144 | def get_nodes(structure): |
| 145 | if isinstance(structure, dict): |
| 146 | structure_node = copy.deepcopy(structure) |
| 147 | structure_node.pop('nodes', None) |
| 148 | nodes = [structure_node] |
| 149 | for key in list(structure.keys()): |
| 150 | if 'nodes' in key: |
| 151 | nodes.extend(get_nodes(structure[key])) |
| 152 | return nodes |
| 153 | elif isinstance(structure, list): |
| 154 | nodes = [] |
| 155 | for item in structure: |
| 156 | nodes.extend(get_nodes(item)) |
| 157 | return nodes |
| 158 | |
| 159 | def structure_to_list(structure): |
| 160 | if isinstance(structure, dict): |
nothing calls this directly
no outgoing calls
no test coverage detected