def insideBundle(pathname):
    while len(pathname) > 1:
        if isBundle(pathname):
            return True
        else:
            # chop off last item in path
            pathname = os.path.dirname(pathname)
    #if we get here, we didn't find a bundle path
    return False
Check the path to see if it's inside a bundle.
dataset/ETHPy150Open munki/munki/code/client/munkilib/removepackages.py/insideBundle