docs: public static BidiGlobalDir decodeBidiGlobalDirFromJsOptions(
        int bidiGlobalDir, boolean useGoogIsRtlForBidiGlobalDir) {
      if (bidiGlobalDir == 0) {
        if (!useGoogIsRtlForBidiGlobalDir) {
          return null;
        }
        return BidiGlobalDir.forIsRtlCodeSnippet(
            GOOG_IS_RTL_CODE_SNIPPET, GOOG_IS_RTL_CODE_SNIPPET_NAMESPACE, SoyBackendKind.JS_SRC);
      }
      Preconditions.checkState(
          !useGoogIsRtlForBidiGlobalDir,
          "Must not specify both bidiGlobalDir and bidiGlobalDirIsRtlCodeSnippet.");
      Preconditions.checkArgument(
          bidiGlobalDir == 1 || bidiGlobalDir == -1,
          "If specified, bidiGlobalDir must be 1 for LTR or -1 for RTL.");
      return BidiGlobalDir.forStaticIsRtl(bidiGlobalDir < 0);
    }