def recursive_scan_for_instance(obj, type, explicit_exclude = None ):
    
    # check this object for type
    if isinstance(obj, type):
        return True

    # check for some explicit types in order to conclude
    # that obj is not of type
    # see dict example
    if explicit_exclude is not None:
        if isinstance(obj, explicit_exclude):
            return False


    # if not of desired type, try to iterate and check each item for type
    try:
        for i in obj:
            # return True, if object is of type or contains type 
            if recursive_scan_for_instance(i, type) == True:
                return True
    except:
        pass

    # either object is not iterable and not of type, or each item is not of type -> return False    
    return False
cursor() -> QCursor
dataset/ETHPy150Open cimatosa/jobmanager/jobmanager/servers.py/recursive_scan_for_instance--crossover with--dataset/ETHPy150Open VisTrails/VisTrails/vistrails/packages/spreadsheet/spreadsheet_helpers.py/CellResizerConfig.cursor