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 layer of provided unranked list of vertices and all their children.
  A vertex will be assigned a layer when all its inward edges have been scanned.
  When a vertex is assigned a layer, its outward edges are marked scanned.
  
  :param vertices: List of unassigned layer vertices
docstr_tok: ["Computes","layer","of","provided","unranked","list","of","vertices","and","all","their","children",".","A","vertex","will","be","assigned","a","layer","when","all","its","inward","edges","have","been","scanned",".","When","a","vertex","is","assigned","a","layer",",","its","outward","edges","are","marked","scanned",".",":","param","vertices",":","List","of","unassigned","layer","vertices"]
code: def _layer_init(self, vertices):
      """
      Computes layer of provided unranked list of vertices and all their children.
      A vertex will be assigned a layer when all its inward edges have been scanned.
      When a vertex is assigned a layer, its outward edges are marked scanned.
  
      :param vertices: List of unassigned layer vertices
      """
      assert self.dag
  
      def normal_visit(real_roots):
          should_visit = {}
          # set layer of unranked based on its in-edges vertices ranks:
          while len(real_roots) > 0:
              coll = []
              for v in real_roots:
                  self._set_layer(v)
                  # mark out-edges as scanned:
                  for e in v.e_out():
                      should_visit[e] = True
                  # check if out-vertices are layer-able:
                  for x in v.neighbors(+1):
                      # if no edge leads to this neighbor we add it to the collection
                      if not (
                          False
                          in [
                              should_visit.get(e, False)
                              for e in x.e_in()
                          ]
                      ):
                          if x not in coll:
                              coll.append(x)
              real_roots = coll
  
      def dft_visit(fake_root):
          seen = set()
  
          def visit(node, backwards=False):
              self._set_layer(node, backwards)
              seen.add(node)
  
              children = node.neighbors(+1)
              for child in children:
                  if child not in seen:
                      visit(child)
              parents = node.neighbors(-1)
              for parent in parents:
                  if parent not in seen:
                      visit(parent, True)
  
          visit(fake_root)
  
      normal = []
      dft = []
      for vv in vertices:
          if len(vv.e_in()) == 0:
              normal.append(vv)
          else:
              dft.append(vv)
      if len(normal) > 0:
          normal_visit(normal)
      for vv in dft:
          dft_visit(vv)
  
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 17 for calling the SugiyamaLayout obj's underlying member method code with example usage: obj._layer_init(vertices) without return types