def METHOD_NAME(pipeline, ranks):
    """
    @summary: 根据 ranks 快速生成初始化的层级内顶点排序 orders
    @param pipeline:
    @param ranks:
    @return:
    """
    orders = {rk: [] for rk in set(ranks.values())}
    rk = min_rank(ranks)
    orders[rk] = [node_id for node_id, node_rk in ranks.items() if node_rk == rk]
    while rk < max_rank(ranks):
        next_layer_rk = rk + MIN_LEN
        for node_id in orders[rk]:
            node = pipeline["all_nodes"][node_id]
            for flow_id in format_to_list(node[PWE.outgoing]):
                flow = pipeline[PWE.flows][flow_id]
                if flow[PWE.target] not in orders[next_layer_rk]:
                    if flow.get("type") == "DummyFlow":
                        orders[next_layer_rk].insert(0, flow[PWE.target])
                    else:
                        orders[next_layer_rk].append(flow[PWE.target])
        rk = next_layer_rk
    return orders