class_docstr: Summary representation of a graph.
  
  The summary representation includes a header line and the list of
  edges. The header line consists of C{IGRAPH}, followed by a
  four-character long code, the number of vertices, the number of
  edges, two dashes (C{--}) and the name of the graph (i.e.
  the contents of the C{name} attribute, if any). For instance,
  a header line may look like this::
  
      IGRAPH U--- 4 5 --
  
  The four-character code describes some basic properties of the
  graph. The first character is C{U} if the graph is undirected,
  C{D} if it is directed. The second letter is C{N} if the graph
  has a vertex attribute called C{name}, or a dash otherwise. The
  third letter is C{W} if the graph is weighted (i.e. it has an
  edge attribute called C{weight}), or a dash otherwise. The
  fourth letter is C{B} if the graph has a vertex attribute called
  C{type}; this is usually used for bipartite graphs.
  
  Edges may be presented as an ordinary edge list or an adjacency
  list. By default, this depends on the number of edges; however,
  you can control it with the appropriate constructor arguments.
docstr: Constructs the part in the summary that prints the edge list in an
  adjacency list format.
docstr_tok: ["Constructs","the","part","in","the","summary","that","prints","the","edge","list","in","an","adjacency","list","format","."]
code: def _construct_edgelist_adjlist(self):
      """Constructs the part in the summary that prints the edge list in an
      adjacency list format."""
      result = [self._edges_header]
  
      if self._graph.vcount() == 0:
          return
  
      if self._graph.is_named():
          names = self._graph.vs["name"]
          maxlen = max(len(str(name)) for name in names)
          format_str = "%%%ds %s %%s" % (maxlen, self._arrow)
          for v1, name in enumerate(names):
              neis = self._graph.successors(v1)
              neis = ", ".join(str(names[v2]) for v2 in neis)
              result.append(format_str % (name, neis))
      else:
          maxlen = len(str(self._graph.vcount()))
          num_format = "%%%dd" % maxlen
          format_str = "%s %s %%s" % (num_format, self._arrow)
          for v1 in range(self._graph.vcount()):
              neis = self._graph.successors(v1)
              neis = " ".join(num_format % v2 for v2 in neis)
              result.append(format_str % (v1, neis))
  
      # Try to wrap into multiple columns if that works with the given width
      if self.width is not None:
          maxlen = max(len(line) for line in result[1:])
          colcount = int(self.width + 3) / int(maxlen + 3)
          if colcount > 1:
              # Rewrap to multiple columns
              nrows = len(result) - 1
              colheight = int(ceil(nrows / float(colcount)))
              newrows = [[] for _ in range(colheight)]
              for i, row in enumerate(result[1:]):
                  newrows[i % colheight].append(row.ljust(maxlen))
              result[1:] = ["   ".join(row) for row in newrows]
  
      return result
  
imports: import sys
  from igraph.statistics import median
  from itertools import islice
  from math import ceil
  from texttable import Texttable
  from textwrap import TextWrapper
label_desc: Use image node_id 2 for calling the GraphSummary obj's underlying member method code with example usage: obj._construct_edgelist_adjlist() and returns: result