def format(self, name=False, formatter=None, **kwargs):
header = []<EOL>if name:<EOL><INDENT>header.append(pprint_thing(self.name,<EOL>escape_chars=('<STR_LIT:\t>', '<STR_LIT:\r>', '<STR_LIT:\n>')) if<EOL>self.name is not None else '<STR_LIT>')<EOL><DEDENT>if formatter is not None:<EOL><INDENT>return header + list(self.map(formatter))<EOL><DEDENT>return self._format_with_header(header, **kwargs)<EOL>
Render a string representation of the Index.