def test_cooperate(self):
        d = defer.Deferred()
        def doit():
            yield 1
            yield 2
            yield 3
            d.callback("yay")
        it = doit()
        theTask = task.cooperate(it)
        self.assertIn(theTask, task._theCooperator._tasks)
        return d
Try to import a module and if it fails return default.
dataset/ETHPy150Open twisted/twisted/twisted/test/test_cooperator.py/AliasTests.test_cooperate--crossover with--dataset/ETHPy150Open openstack-dev/heat-cfnclient/heat_cfnclient/openstack/common/importutils.py/try_import