class_docstr: The classic Sugiyama layout aka layered layout.
  
  - See https://en.wikipedia.org/wiki/Layered_graph_drawing
  - Excellent explanation: https://www.youtube.com/watch?v=Z0RGCWxvCxA
  
  
  **Attributes**
      - dirvh (int): the current aligment state for alignment policy:
               dirvh=0 -> dirh=+1, dirv=-1: leftmost upper
               dirvh=1 -> dirh=-1, dirv=-1: rightmost upper
               dirvh=2 -> dirh=+1, dirv=+1: leftmost lower
               dirvh=3 -> dirh=-1, dirv=+1: rightmost lower
      - order_iter (int): the default number of layer placement iterations
      - order_attr (str): set attribute name used for layer ordering
      - xspace (int): horizontal space between vertices in a layer
      - yspace (int): vertical space between layers
      - dw (int): default width of a vertex
      - dh (int): default height of a vertex
      - g (GraphBase): the graph component reference
      - layers (list[sugiyama.layer.Layer]): the list of layers
      - layoutVertices (dict): associate vertex (possibly dummy) with their sugiyama attributes
      - ctrls (dict): associate edge with all its vertices (including dummies)
      - dag (bool): the current acyclic state
      - init_done (bool): True if things were initialized
  
  **Example**
  
      ::
  
          g = nx.generators.connected_watts_strogatz_graph(1000, 2, 0.3)
          # render
          SugiyamaLayout.draw(g)
          # positions
          positions_dictionary = SugiyamaLayout.arrange(g)
docstr: Computes all vertex coordinates using Brandes & Kopf algorithm.
  See https://www.semanticscholar.org/paper/Fast-and-Simple-Horizontal-Coordinate-Assignment-Brandes-Köpf/69cb129a8963b21775d6382d15b0b447b01eb1f8
docstr_tok: ["Computes","all","vertex","coordinates","using","Brandes","&","Kopf","algorithm",".","See","https",":","\/\/www.semanticscholar.org\/paper\/Fast-and-Simple-Horizontal-Coordinate-Assignment-Brandes-K\u00f6pf\/69cb129a8963b21775d6382d15b0b447b01eb1f8"]
code: def set_coordinates(self):
      """
      Computes all vertex coordinates using Brandes & Kopf algorithm.
      See https://www.semanticscholar.org/paper/Fast-and-Simple-Horizontal-Coordinate-Assignment-Brandes-Köpf/69cb129a8963b21775d6382d15b0b447b01eb1f8
      """
      self._edge_inverter()
      self._detect_alignment_conflicts()
      inf = float("infinity")
  
      # initialize layout vertex
      for layer in self.layers:
          for v in layer:
              self.layoutVertices[v].root = v
              self.layoutVertices[v].align = v
              self.layoutVertices[v].sink = v
              self.layoutVertices[v].shift = inf
              self.layoutVertices[v].X = None
              self.layoutVertices[v].x = [0.0] * 4
      current_h = self.dirvh
      for dirvh in range(4):
          self.dirvh = dirvh
          self._coord_vertical_alignment()
          self._coord_horizontal_compact()
      self.dirvh = current_h  # restore it
  
      # vertical coordinate assigment of all nodes:
      current_y = 0
      for layer in self.layers:
          dY = max([v.view.h / 2.0 for v in layer])
          for v in layer:
              vx = sorted(self.layoutVertices[v].x)
              # mean of the 2 medians out of the 4 x-coord computed above:
              avgm = (vx[1] + vx[2]) / 2.0
              # final xy-coordinates :
              v.view.xy = (avgm, current_y + dY)
          current_y += 2 * dY + self.yspace
      self._edge_inverter()
  
imports: import pandas, typing
  from sys import getrecursionlimit, setrecursionlimit
  from graphistry.layout.graph import Vertex, GraphBase, Graph, Edge
  from graphistry.layout.utils import DummyVertex, LayoutVertex, Rectangle, size_median
  from graphistry.layout.utils.layer import Layer
label_desc: Use image node_id 25 for calling the SugiyamaLayout obj's underlying member method code with example usage: obj.set_coordinates() without return types