Given a tuple of tuples, construct several files() generators, and
yield from those randomly. Randomness is weighted based on the number
of files remaining in each group.
context is a generic Bunch that we can store items in to be shared
across modules, without invoking the wrath of the globals -- yuck!
get_next_key will generate a sequentially numbered key for us to use
fill_pools will take a variable list of gevent.pool.Pool objects and
top them all off
The file verifier will now correctly verify small files (smaller than
the md5 digest size), as long as the data that is there matches what
the digest would be.
Accessing a non-constant global from another module is tricky,
as the import binds to the original object. Rebinding the name
in the original module does not change it in importers. Use a
getter as a quick workaround.