code: def main(argv):
      if len(argv) != 1:
          raise app.UsageError("No positional arguments are accepted.")
  
      if not _IR_DEST.value and not _IR_HUMAN_DEST.value:
          raise app.Error(
              "At least one of --ir_dest and "
              "--ir_human_dest is required."
          )
  
      module_name, fn_name = _FN.value.rsplit(".", 1)
      module = importlib.import_module(module_name)
      fn = getattr(module, fn_name)
  
      input_shapes = [
          (name, parse_shape_str(shape_str))
          for name, shape_str in literal_eval(_INPUT_SHAPES.value)
      ]
  
      # Parse --constants and --evaled_constants.
      constants = {}
      for k, v in literal_eval(_CONSTANTS.value).items():
          if isinstance(v, list):
              v = jnp.asarray(v)
          constants[k] = v
  
      for k, v in literal_eval(_EVALED_CONSTANTS.value).items():
          if isinstance(v, str):
              v = literal_eval(v)
          if isinstance(v, list):
              v = jnp.asarray(v)
          if k in constants:
              raise ValueError(
                  "Argument appears in both --constants and --evaled_constants: %s"
                  % k
              )
          constants[k] = v
  
      ir, debug_ir = jax_to_ir(
          fn, input_shapes, constants=constants, format=_IR_FORMAT.value
      )
  
      if _IR_DEST.value:
          with open(_IR_DEST.value, "wb") as f:
              f.write(ir)
  
      if _IR_HUMAN_DEST.value:
          with open(_IR_HUMAN_DEST.value, "w") as f:
              f.write(debug_ir)
  
file_path: jax/jax/tools/jax_to_ir.py
imports: from ast import literal_eval
  import importlib
  import functools
  import re
  from absl import app
  from absl import flags
  import jax
  import jax.numpy
label_desc: Use image node_id 3 for calling a global function with example usage: main(argv) without return types