def __init__(self, graph, col_map, row_map, node_locs, max_col, max_row) -> None:
        """
        :param networkx.DiGraph graph:  The graph to route edges on.
        """
        self._graph = graph

        self._rows = row_map
        self._cols = col_map
        self._node_locations = node_locs
        self._max_row = max_row
        self._max_col = max_col

        # Mark whether a spot (col, row) is valid or not for putting edges.
        self._edge_valid = []
        # A map between spots (col, row) and all vertical edges at that spot.
        self.vertical_edges = []
        # A map between spots (col, row) and all horizontal edges at that spot.
        self.horizontal_edges = []

        self._in_edges = defaultdict(list)
        self._out_edges = defaultdict(list)

        self.edges = self._route_edges()

        :param networkx.DiGraph graph:  The graph to route edges on.
        
angrmanagement/utils/graph_layouter.py