code: def cli_main(parser, args):
      global return_value
      return_value = False
  
      if "func" not in args:
          parser.print_help(sys.stderr)
          sys.exit(-1)
  
      if args.mpi:
          from nnabla.utils.communicator_util import create_communicator
  
          comm = create_communicator()
          try:
              return_value = args.func(args)
          except:
              import traceback
  
              print(traceback.format_exc())
  
              logger.log(99, "ABORTED")
              os.kill(os.getpid(), 9)
              # comm.abort()
      else:
          try:
              return_value = args.func(args)
          except:
              import traceback
  
              print(traceback.format_exc())
              return_value = False
              sys.exit(-1)
  
file_path: nnabla/python/src/nnabla/utils/cli/cli.py
imports: import argparse
  import os
  import sys
  import warnings
  from nnabla.logger import logger
label_desc: Use image node_id 4 for calling a global function with example usage: cli_main(parser, args) without return types