This is a relatively large signature change; to test it one should mock multiple functions. On the other hand, if we go with the environment variable idea, one could avoid changing any signature at all, by using a global

no_distribute = os.environ.get('NO_DISTRIBUTE', False)

What do you think?