build.combinations()
Every set of 1 to max_size drivers that holds no excluded pair.
Usage
build.combinations(
drivers,
max_size,
exclusions=(),
)Sets are ordered by size, then as itertools.combinations gives them in the order of drivers. Without exclusions there are sum(comb(n, k) for k in 1..max_size) of them.