code: def dmlc_opts(opts):
      """convert from mxnet's opts to dmlc's opts"""
      args = [
          "--num-workers",
          str(opts.num_workers),
          "--num-servers",
          str(opts.num_servers),
          "--cluster",
          opts.launcher,
          "--host-file",
          opts.hostfile,
          "--sync-dst-dir",
          opts.sync_dst_dir,
      ]
  
      # convert to dictionary
      dopts = vars(opts)
      for key in ["env_server", "env_worker", "env"]:
          for v in dopts[key]:
              args.append("--" + key.replace("_", "-"))
              args.append(v)
      args += opts.command
      try:
          from dmlc_tracker import opts
      except ImportError:
          logging.info(
              "Can't load dmlc_tracker package.  Perhaps you need to run"
          )
          logging.info("    git submodule update --init --recursive")
          raise
      dmlc_opts = opts.get_opts(args)
      return dmlc_opts
  
imports: import argparse
  import os, sys
  import signal
  import logging
label_desc: Use image node_id 1 for calling a global function with example usage: dmlc_opts(opts) and returns: dmlc_opts