def mywalk(top, skipdirs=['.snapshot',]):
    for root, dirs, files in walk(top,topdown=True,onerror=walkerr): 
        for skipdir in skipdirs:
            if skipdir in dirs:
                dirs.remove(skipdir)  # don't visit this directory 
        yield root, dirs, files
>>> multiply(4, 3)
dataset/ETHPy150Open FredHutch/swift-commander/swift_commander/swsymlinks.py/mywalk--crossover with--dataset/ETHPy150Open Akagi201/learning-python/pytest/unnecessary_math.py/multiply