```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:
    # Retrieve the compilation output property once to avoid repeated dict lookups
    node_prop = execution_graph.nodes[node][NODE_COMPILATION_OUTPUT_PROPERTY]
    if node_prop.node_category is not NodeCategory.STEP_NODE:
        return False
    return node_prop.controls_flow()




def is_step_node(execution_graph: DiGraph, node: str) -> bool:
    node_prop = execution_graph.nodes[node][NODE_COMPILATION_OUTPUT_PROPERTY]
    return node_prop.node_category is NodeCategory.STEP_NODE
```