def db_delete_module(self, module):
        self.is_dirty = True
        try:
            i = self.db_modules_inverted_id_index[module._db_id]
        except __HOLE__:
            for i in xrange(len(self._db_modules)):
                if self._db_modules[i]._db_id == module._db_id:
                    break
        if not self._db_modules[i].is_new:
            self.db_deleted_modules.append(self._db_modules[i])
        # update inverted index because things got pulled back on the _db_modules list
        for m in self._db_modules[i+1:]:
            self.db_modules_inverted_id_index[m._db_id] -= 1
        del self._db_modules[i]
        del self.db_modules_id_index[module._db_id]
        del self.db_modules_inverted_id_index[module._db_id]
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/db/versions/v0_9_1/domain/auto_gen.py/DBWorkflow.db_delete_module