def translate_table(data):
headers = sorted(data.get("<STR_LIT>", []))<EOL>table = '<STR_LIT>'.replace('<STR_LIT>', data.get("<STR_LIT>", "<STR_LIT>"))<EOL>table += '<STR_LIT>'<EOL>n_cols = "<STR_LIT:c>"*(len(headers)+<NUM_LIT:1>)<EOL>table += '<STR_LIT>'.replace("<STR_LIT>", n_cols)<EOL>for header in headers:<EOL><INDENT>table += '<STR_LIT>'.replace('<STR_LIT>', header).replace('<STR_LIT:%>', '<STR_LIT>')<EOL><DEDENT>table = table[:-<NUM_LIT:1>] + '<STR_LIT>'<EOL>for header in headers:<EOL><INDENT>table += '<STR_LIT>'.replace("<STR_LIT>", str(data["<STR_LIT>"][header]))<EOL><DEDENT>table = table[:-<NUM_LIT:1>] + '<STR_LIT>'<EOL>table += '<STR_LIT>'<EOL>return table<EOL>
Translates data where data["Type"]=="Table