def _RemoveTaskFromIndex(self, index, index_tuple, task):
    assert self._lock.locked()
    pos = bisect.bisect_left(index, index_tuple)
    if index[pos][-1] is not task:
      logging.debug('Expected %s, found %s', task, index[pos][-1])
      return False
    index.pop(pos)
    return True
Modified to return application instance, early defined
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/taskqueue/taskqueue_stub.py/_Queue._RemoveTaskFromIndex--crossover with--dataset/ETHPy150Open selfsk/nodeset.core/src/nodeset/common/twistedapi.py/NodeSetApplicationRunner.createOrGetApplication