code: def _create_compare_parser(
      parser: argparse.ArgumentParser,
      placeholders: AbstractSet[str] | None,
  ) -> None:
      """Adds flags for the compare command.
  
      Args:
        parser: The parser to which flags will be added.
        placeholders: Placeholders from prompts in the compiled functions.
      """
  
      # Add positional arguments.
      def _resolve_llm_function_fn(
          var_name: str,
      ) -> tuple[str, llm_function.LLMFunction]:
          try:
              py_utils.validate_var_name(var_name)
          except ValueError as e:
              # Re-raise as ArgumentError to preserve the original error message.
              raise argparse.ArgumentError(None, "{}".format(e)) from e
  
          fn = py_utils.get_py_var(var_name)
          if not isinstance(fn, llm_function.LLMFunction):
              raise argparse.ArgumentError(
                  None,
                  '{} is not a function created with the "compile" command'.format(
                      var_name
                  ),
              )
          return var_name, fn
  
      name_help = (
          "The name of a Python variable containing a function previously created"
          ' with the "compile" command.'
      )
      parser.add_argument(
          "lhs_name_and_fn",
          help=name_help,
          type=_resolve_llm_function_fn,
      )
      parser.add_argument(
          "rhs_name_and_fn",
          help=name_help,
          type=_resolve_llm_function_fn,
      )
  
      _add_input_flags(parser, placeholders)
      _add_output_flags(parser)
      _add_compare_flags(parser)
  
imports: from __future__ import annotations
  import argparse
  import shlex
  import sys
  from typing import AbstractSet, Any, Callable, MutableMapping, Sequence
  from google.generativeai.notebook import argument_parser
  from google.generativeai.notebook import flag_def
  from google.generativeai.notebook import input_utils
  from google.generativeai.notebook import model_registry
  from google.generativeai.notebook import output_utils
  from google.generativeai.notebook import parsed_args_lib
  from google.generativeai.notebook import post_process_utils
  from google.generativeai.notebook import py_utils
  from google.generativeai.notebook import sheets_utils
  from google.generativeai.notebook.lib import llm_function
  from google.generativeai.notebook.lib import llmfn_inputs_source
  from google.generativeai.notebook.lib import llmfn_outputs
  from google.generativeai.notebook.lib import model
label_desc: Use image node_id 14 for calling a global function with example usage: _create_compare_parser(parser, placeholders) and returns: var_name,  fn