Oh, and if you want to know "What does cohomology_generators actually do?", evaluate B.cohomology_generators?? to read the source code.