docs: public static BidiGlobalDir forIsRtlCodeSnippet(
        String isRtlCodeSnippet, @Nullable String namespace, SoyBackendKind backend) {
      Preconditions.checkArgument(
          isRtlCodeSnippet != null && isRtlCodeSnippet.length() > 0,
          "Bidi global direction source code snippet must be non-empty.");
      Preconditions.checkArgument(
          backend == SoyBackendKind.JS_SRC || backend == SoyBackendKind.PYTHON_SRC,
          "Bidi code snippets are only used in JS and Python.");
      if (backend == SoyBackendKind.JS_SRC) {
        return new BidiGlobalDir(isRtlCodeSnippet + "?-1:1", namespace);
      } else {
        return new BidiGlobalDir("-1 if " + isRtlCodeSnippet + " else 1", namespace);
      }
    }