code: def add_compile_parser(subparsers, _, json_params):
      """Include parser for 'compile' subcommand"""
  
      parser = subparsers.add_parser("compile", help="compile a model.")
      parser.set_defaults(func=drive_compile)
      parser.add_argument(
          "--cross-compiler",
          default="",
          help="the cross compiler to generate target libraries, e.g. 'aarch64-linux-gnu-gcc'.",
      )
      parser.add_argument(
          "--cross-compiler-options",
          default="",
          help="the cross compiler options to generate target libraries, e.g. '-mfpu=neon-vfpv4'.",
      )
      generate_transform_args(parser)
      parser.add_argument(
          "--dump-code",
          metavar="FORMAT",
          default="",
          help="comma separated list of formats to export the input model, e.g. 'asm,ll,tir,relay'.",
      )
      parser.add_argument(
          "--dump-offloads",
          default="",
          help="output a mapping of which operations of the initial Relay "
          "will be transferred to which backend, indicating the composite "
          "that includes those operations, "
          "e.g. '--dump-offloads -' to dump to the console, "
          "e.g. '--dump-offloads <path_to_file>' to dump to the file. "
          "If not presented, no output is done. ",
      )
      parser.add_argument(
          "--model-format",
          choices=frontends.get_frontend_names(),
          help="specify input model format.",
      )
      parser.add_argument(
          "-o",
          "--output",
          default="module.tar",
          help="output the compiled module to a specified archive. Defaults to 'module.tar'.",
      )
      parser.add_argument(
          "-f",
          "--output-format",
          choices=["so", "mlf"],
          default="so",
          help="output format. Use 'so' for shared object or 'mlf' for Model Library Format "
          "(only for microTVM targets). Defaults to 'so'.",
      )
      parser.add_argument(
          "--pass-config",
          action="append",
          metavar=("name=value"),
          help="configurations to be used at compile time. This option can be provided multiple "
          "times, each one to set one configuration value, "
          "e.g. '--pass-config relay.backend.use_auto_scheduler=0', "
          "e.g. '--pass-config tir.add_lower_pass=opt_level1,pass1,opt_level2,pass2'.",
      )
  
      generate_target_args(parser)
      parser.add_argument(
          "--tuning-records",
          metavar="PATH",
          default="",
          help="path to an auto-tuning log file by AutoTVM. If not presented, "
          "the fallback/tophub configs will be used.",
      )
      generate_registry_args(parser, Executor, "graph")
      generate_registry_args(parser, Runtime, "cpp")
  
      parser.add_argument(
          "-v",
          "--verbose",
          action="count",
          default=0,
          help="increase verbosity.",
      )
      # TODO (@leandron) This is a path to a physical file, but
      #     can be improved in future to add integration with a modelzoo
      #     or URL, for example.
      parser.add_argument("FILE", help="path to the input model file.")
      parser.add_argument(
          "-O",
          "--opt-level",
          default=3,
          type=int,
          choices=range(0, 4),
          metavar="[0-3]",
          help="specify which optimization level to use. Defaults to '3'.",
      )
      parser.add_argument(
          "--input-shapes",
          help="specify non-generic shapes for model to run, format is "
          '"input_name:[dim1,dim2,...,dimn] input_name2:[dim1,dim2]".',
          type=parse_shape_string,
          default=None,
      )
      parser.add_argument(
          "--disabled-pass",
          help="disable specific passes, comma-separated list of pass names.",
          type=parse_pass_list_str,
          default="",
      )
      parser.add_argument(
          "--module-name",
          default="default",
          help="The output module name. Defaults to 'default'.",
      )
      parser.add_argument(
          "--print-pass-times",
          action="store_true",
          help="print compilation time per pass",
      )
      parser.add_argument(
          "--print-ir-before",
          help="print IR before each named pass of a comma-separated list of pass names."
          "e.g. '--print-ir-before [tir.SplitHostDevice,tir.ConvertSSA]' ",
          default="",
      )
      parser.add_argument(
          "--print-ir-after",
          help="print IR after each named pass of a comma-separated list of pass names."
          "e.g. '--print-ir-after [tir.SplitHostDevice,tir.ConvertSSA]' ",
          default="",
      )
      for one_entry in json_params:
          parser.set_defaults(**one_entry)
  
      generate_workspace_pools_args(parser)
  
imports: import logging
  import os.path
  import re
  import itertools
  from copy import deepcopy
  from typing import Any, Optional, Dict, List, Union, Callable, Sequence
  from pathlib import Path
  from collections import defaultdict
  import tvm
  from tvm import autotvm, auto_scheduler
  from tvm import relay
  from tvm.driver.tvmc.registry import generate_registry_args, reconstruct_registry_entity
  from tvm.ir.instrument import PassInstrument, PassTimingInstrument, PassPrintingInstrument
  from tvm.ir.memory_pools import WorkspaceMemoryPools
  from tvm.target import Target
  from tvm.relay.backend import Executor, Runtime
  from tvm.relay.analysis.operations_distribution import analyze_operations_distribution
  from tvm.relay.transform.suffixes import tag_suffixes
  from .None import composite_target, frontends, TVMCException
  from .model import TVMCModel, TVMCPackage
  from .main import register_parser
  from .target import target_from_cli, generate_target_args, reconstruct_target_args
  from .pass_config import parse_configs
  from .pass_list import parse_pass_list_str
  from .transform import generate_transform_args, parse_graph_transform_args, apply_graph_transforms
  from .shape_parser import parse_shape_string
  from .workspace_pools import generate_workspace_pools_args, workspace_pools_recombobulate
label_desc: Use image node_id 1 for calling a global function with example usage: add_compile_parser(subparsers, _, json_params) without return types