The function selects the top_n paths by sorting paths_tbl on
path_risk_score (descending). For those paths, it:
builds an edge list from path_nodes,
marks graph edges that appear on at least one top path,
computes path_freq (how many top paths include each edge),
computes risk_mean_path (mean of risk_sum across top paths that
include each edge),
highlights nodes that appear on any top path.
Node fills are based on cyclomatic_complexity using breaks
(-Inf, 10], (10, 20], (20, 50], (50, Inf] as per Watson & McCabe (1996).
This function relies on external theming/label objects theme_AP() and
lab_expr being available in the calling environment or package namespace.