def flat_model(tree):
names = []<EOL>for columns in viewvalues(tree):<EOL><INDENT>for col in columns:<EOL><INDENT>if isinstance(col, dict):<EOL><INDENT>col_name = list(col)[<NUM_LIT:0>]<EOL>names += [col_name + '<STR_LIT>' + c for c in flat_model(col)]<EOL><DEDENT>else:<EOL><INDENT>names.append(col)<EOL><DEDENT><DEDENT><DEDENT>return names<EOL>
Flatten the tree into a list of properties adding parents as prefixes.