def METHOD_NAME(profile='default'):
    """Find the path to the folder associated with a given profile.
    I.e. find $IPYTHONDIR/profile_whatever.
    """
    from IPython.core.profiledir import ProfileDir, ProfileDirError
    try:
        pd = ProfileDir.find_profile_dir_by_name(get_ipython_dir(), profile)
    except ProfileDirError as e:
        # IOError makes more sense when people are expecting a path
        raise IOError("Couldn't find profile %r" % profile) from e
    return pd.location