docs: private Map<String, Config> extractProfiles(Config sourceConfig) {
      ImmutableMap.Builder<String, Config> result = ImmutableMap.builder();
  
      Config defaultProfileConfig = sourceConfig.withoutPath("profiles");
      result.put(DriverExecutionProfile.DEFAULT_NAME, defaultProfileConfig);
  
      // The rest of the method is a bit confusing because we navigate between Typesafe config's two
      // APIs, see https://github.com/typesafehub/config#understanding-config-and-configobject
      // In an attempt to clarify:
      //    xxxObject = `ConfigObject` API (config as a hierarchical structure)
      //    xxxConfig = `Config` API (config as a flat set of options with hierarchical paths)
      ConfigObject rootObject = sourceConfig.root();
      if (rootObject.containsKey("profiles") && rootObject.get("profiles").valueType() == OBJECT) {
        ConfigObject profilesObject = (ConfigObject) rootObject.get("profiles");
        for (String profileName : profilesObject.keySet()) {
          if (profileName.equals(DriverExecutionProfile.DEFAULT_NAME)) {
            throw new IllegalArgumentException(
                String.format(
                    "Can't have %s as a profile name because it's used internally. Pick another name.",
                    profileName));
          }
          ConfigValue profileObject = profilesObject.get(profileName);
          if (profileObject.valueType() == OBJECT) {
            Config profileConfig = ((ConfigObject) profileObject).toConfig();
            result.put(profileName, profileConfig.withFallback(defaultProfileConfig));
          }
        }
      }
      return result.build();
    }