def isBundle(pathname):
    bundle_extensions = [".action",
                         ".app",
                         ".bundle",
                         ".clr",
                         ".colorPicker",
                         ".component",
                         ".dictionary",
                         ".docset",
                         ".framework",
                         ".fs",
                         ".kext",
                         ".loginPlugin",
                         ".mdiimporter",
                         ".monitorPanel",
                         ".osax",
                         ".pkg",
                         ".plugin",
                         ".prefPane",
                         ".qlgenerator",
                         ".saver",
                         ".service",
                         ".slideSaver",
                         ".SpeechRecognizer",
                         ".SpeechSynthesizer",
                         ".SpeechVoice",
                         ".spreporter",
                         ".wdgt"]
    if os.path.isdir(pathname):
        basename = os.path.basename(pathname)
        extension = os.path.splitext(basename)[1]
        if extension in bundle_extensions:
            return True
        else:
            return False
    else:
        return False
Returns true if pathname is a bundle-style directory.
dataset/ETHPy150Open munki/munki/code/client/munkilib/removepackages.py/isBundle