def db_delete_object(self, objId, objType, 
                         parentObjType=None, parentObjId=None):
        if parentObjType is None or parentObjId is None:
            parentObj = self
        else:
            try:
                parentObj = self.objects[(parentObjType, parentObjId)]
            except KeyError:
                msg = "Cannot find object of type '%s' with id '%s'" % \
                    (parentObjType, parentObjId)
                raise Exception(msg)
        funname = 'db_get_%s' % objType
        try:
            object = getattr(parentObj, funname)(objId)
        except __HOLE__:
            attr_name = 'db_%s' % objType
            object = getattr(parentObj, attr_name)
        funname = 'db_delete_%s' % objType
        getattr(parentObj, funname)(object)
        self.deleteFromIndex(object)
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/db/versions/v0_7_0/domain/workflow.py/DBWorkflow.db_delete_object