code: def target_from_cli(target, additional_target_options=None):
      """
      Create a tvm.target.Target instance from a
      command line interface (CLI) string.
  
      Parameters
      ----------
      target : str
          compilation target as plain string,
          inline JSON or path to a JSON file
  
      additional_target_options: Optional[Dict[str, Dict[str,str]]]
          dictionary of additional target options to be
          combined with parsed targets
  
      Returns
      -------
      tvm.target.Target
          an instance of target device information
      extra_targets : list of dict
          This list preserves the order in which extra targets were
          provided via command line. Each Dict contains three keys:
          'name', containing the name of the codegen; 'opts' containing
          a key-value for all options passed via CLI; 'raw',
          containing the plain string for this codegen
      """
      extra_targets = []
  
      if os.path.isfile(target):
          with open(target) as target_file:
              logger.debug("target input is a path: %s", target)
              target = "".join(target_file.readlines())
      elif is_inline_json(target):
          logger.debug("target input is inline JSON: %s", target)
      else:
          logger.debug("target input is plain text: %s", target)
          try:
              parsed_targets = parse_target(target)
          except ValueError as error:
              raise TVMCException(
                  f"Error parsing target string '{target}'.\nThe error was: {error}"
              )
  
          validate_targets(parsed_targets, additional_target_options)
          tvm_targets = [
              _combine_target_options(t, additional_target_options)
              for t in parsed_targets
              if t["is_tvm_target"]
          ]
  
          # Validated target strings have 1 or 2 tvm targets, otherwise
          # `validate_targets` above will fail.
          if len(tvm_targets) == 1:
              target = _recombobulate_target(tvm_targets[0])
              target_host = None
          else:
              assert len(tvm_targets) == 2
              target = _recombobulate_target(tvm_targets[0])
              target_host = _recombobulate_target(tvm_targets[1])
  
          extra_targets = [
              _combine_target_options(t, additional_target_options)
              for t in parsed_targets
              if not t["is_tvm_target"]
          ]
  
      return tvm.target.Target(target, host=target_host), extra_targets
  
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 14 for calling a global function with example usage: target_from_cli(target, additional_target_options) and returns: tvm,  extra_targets