def db_delete_object(self, obj_id, obj_type, parent_obj_type=None, 
                         parent_obj_id=None, parent_obj=None):
        if parent_obj is None:
            if parent_obj_type is None or parent_obj_id is None:
                parent_obj = self
            else:
                if parent_obj_type == 'abstractionRef' or \
                        parent_obj_type == 'group':
                    parent_obj_type = 'module'
                try:
                    parent_obj = self.objects[(parent_obj_type, parent_obj_id)]
                except __HOLE__:
                    msg = "Cannot find object of type '%s' with id '%s'" % \
                        (parent_obj_type, parent_obj_id)
                    raise Exception(msg)
        if obj_type == 'abstractionRef' or obj_type == 'group':
            obj_type = 'module'
        funname = 'db_get_' + obj_type
        if hasattr(parent_obj, funname):
            object = getattr(parent_obj, funname)(obj_id)
        else:
            attr_name = 'db_' + obj_type
            object = getattr(parent_obj, attr_name)
        funname = 'db_delete_' + obj_type
        getattr(parent_obj, funname)(object)
        self.delete_from_index(object)
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/db/versions/v0_9_3/domain/workflow.py/DBWorkflow.db_delete_object