def _summary(self, name=None):
if len(self) > <NUM_LIT:0>:<EOL><INDENT>head = self[<NUM_LIT:0>]<EOL>if hasattr(head, '<STR_LIT>') and not isinstance(head, str):<EOL><INDENT>head = head.format()<EOL><DEDENT>tail = self[-<NUM_LIT:1>]<EOL>if hasattr(tail, '<STR_LIT>') and not isinstance(tail, str):<EOL><INDENT>tail = tail.format()<EOL><DEDENT>index_summary = '<STR_LIT>' % (pprint_thing(head),<EOL>pprint_thing(tail))<EOL><DEDENT>else:<EOL><INDENT>index_summary = '<STR_LIT>'<EOL><DEDENT>if name is None:<EOL><INDENT>name = type(self).__name__<EOL><DEDENT>return '<STR_LIT>' % (name, len(self), index_summary)<EOL>
Return a summarized representation.

Parameters
----------
name : str
    name to use in the summary representation

Returns
-------
String with a summarized representation of the index