def _is_generator(obj):
return isinstance(obj, types.GeneratorType)<EOL>
Helper to test for a generator object.

    NOTE: This tests for the (iterable) object returned by calling a
    generator function, not for a generator function.