def is_generator_function(obj):
  CO_GENERATOR = 0x20
  return bool(((inspect.isfunction(obj) or inspect.ismethod(obj)) and
               obj.func_code.co_flags & CO_GENERATOR))
should be able to load an extension
dataset/ETHPy150Open livid/v2ex/mapreduce/util.py/is_generator_function--crossover with--dataset/ETHPy150Open cobrateam/splinter/tests/test_webdriver_firefox.py/FirefoxWithExtensionTest.test_create_a_firefox_instance_with_extension