code: def generate_target_args(parser):
      """Walks through the TargetKind registry and generates arguments for each Target's options"""
      parser.add_argument(
          "--target",
          help="compilation target as plain string, inline JSON or path to a JSON file",
          required=False,
      )
      for target_kind in _valid_target_kinds():
          _generate_target_kind_args(parser, target_kind)
      for codegen_name in get_codegen_names():
          _generate_codegen_args(parser, codegen_name)
  
imports: import os
  import logging
  import json
  import re
  import tvm
  from tvm.driver import tvmc
  from tvm.driver.tvmc import TVMCException
  from tvm.driver.tvmc.composite_target import get_codegen_by_target, get_codegen_names
  from tvm.ir.attrs import make_node, _ffi_api
  from tvm.ir.transform import PassContext
  from tvm.target import Target, TargetKind
label_desc: Use image node_id 4 for calling a global function with example usage: generate_target_args(parser) without return types