def dump_grid(grid):
header = '<STR_LIT>' % dump_str(str(grid._version), version=grid._version)<EOL>if bool(grid.metadata):<EOL><INDENT>header += '<STR_LIT:U+0020>' + dump_meta(grid.metadata, version=grid._version)<EOL><DEDENT>columns = dump_columns(grid.column, version=grid._version)<EOL>rows = dump_rows(grid)<EOL>return '<STR_LIT:\n>'.join([header, columns] + rows + ['<STR_LIT>'])<EOL>
Dump a single grid to its ZINC representation.