docs: function getLevel(nameOrValue) {
    // DEBUG is not a predefined Closure log level, but maps to CONFIG. Since
    // DEBUG is a predefined level for the WebDriver protocol, we prefer it over
    // CONFIG.
    if ('DEBUG' === nameOrValue || Logger.Level.DEBUG.value === nameOrValue) {
      return Logger.Level.DEBUG;
    } else if (goog.isString(nameOrValue)) {
      return Logger.Level.getPredefinedLevel(/** @type {string} */(nameOrValue))
          || Logger.Level.ALL;
    } else {
      return Logger.Level.getPredefinedLevelByValue(
          /** @type {number} */(nameOrValue)) || Logger.Level.ALL;
    }
  }