The notebooks here need an update for more recent versions of ESMValCore. To use them with a recent version of ESMValCore, add the line from esmvalcore.config import CFG and replace occurrences of esmvaltool.CFG with just CFG.
The complete and up to date Python/Notebook API documentation is available here: https://docs.esmvaltool.org/projects/ESMValCore/en/latest/api/esmvalcore.html