def getPluginParentDir(name, curConfig=None):
    """
    Finds the directory a plugin lives in and returns it. This throws
    an exception if it can't find a directory named name in any of the
    set plugin_directory paths.

    :params name: The name of the plugin (i.e. its directory name)
    :type name: str
    """
    for potentialParentDir in getPluginDirs(curConfig):
        if os.path.isdir(os.path.join(potentialParentDir, name)):
            return potentialParentDir

    raise Exception(name % 'Plugin directory %s does not exist.')
dataset/ETHPy150Open girder/girder/girder/utility/plugin_utilities.py/getPluginParentDir/swapped operands of `%`