```python:inference/core/workflows/execution_engine/v1/compiler/utils.py
from inference.core.workflows.execution_engine.constants import \
    NODE_COMPILATION_OUTPUT_PROPERTY
from inference.core.workflows.execution_engine.v1.compiler.entities import \
    NodeCategory
from networkx import DiGraph


def is_control_flow_step(execution_graph: DiGraph, node: str) -> bool:
    if not is_step_node(execution_graph=execution_graph, node=node):
        return False
    return execution_graph.nodes[node][NODE_COMPILATION_OUTPUT_PROPERTY].controls_flow()
```
```python:inference/core/workflows/execution_engine/v1/compiler/graph_constructor.py
from typing import List, Tuple

from inference.core.workflows.execution_engine.v1.compiler.utils import \
    is_control_flow_step
from networkx import DiGraph


def separate_control_flow_predecessors_from_data_providers(
    execution_graph: DiGraph,
    node: str,
) -> Tuple[List[str], List[str]]:
    all_control_flow_predecessors: List[str] = []
    all_non_control_flow_predecessors: List[str] = []
    append_cf = all_control_flow_predecessors.append
    append_non = all_non_control_flow_predecessors.append

    for predecessor in execution_graph.predecessors(node):
        if is_control_flow_step(execution_graph=execution_graph, node=predecessor):
            append_cf(predecessor)
        else:
            append_non(predecessor)

    return all_control_flow_predecessors, all_non_control_flow_predecessors
```