def get_header(results):
ret = ['<STR_LIT:name>', ]<EOL>values = next(iter(results.values()))<EOL>for k, v in values.items():<EOL><INDENT>if isinstance(v, dict):<EOL><INDENT>for metric in v.keys():<EOL><INDENT>ret.append('<STR_LIT>' % (k, metric))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>ret.append(k)<EOL><DEDENT><DEDENT>return ret<EOL>
Extracts the headers, using the first value in the dict as the template