def METHOD_NAME():
    """Create the base directories required for a new AiiDA instance.
    This will create the base AiiDA directory defined by the AIIDA_CONFIG_FOLDER variable, unless it already exists.
    Subsequently, it will create the daemon directory within it and the daemon log directory.
    """
    from aiida.common import ConfigurationError
    directory_base = pathlib.Path(AIIDA_CONFIG_FOLDER).expanduser()
    directory_daemon = directory_base / DAEMON_DIR
    directory_daemon_log = directory_base / DAEMON_LOG_DIR
    directory_access = directory_base / ACCESS_CONTROL_DIR
    list_of_paths = [
        directory_base,
        directory_daemon,
        directory_daemon_log,
        directory_access,
    ]
    umask = os.umask(DEFAULT_UMASK)
    try:
        for path in list_of_paths:
            if path is directory_base and not path.exists():
                warnings.warn(f'Creating AiiDA configuration folder `{path}`.')
            try:
                path.mkdir(parents=True, exist_ok=True)
            except OSError as exc:
                raise ConfigurationError(f'could not create the `{path}` configuration directory: {exc}') from exc
    finally:
        os.umask(umask)