code: def main():
      args = parse_args()
      logger.info("Called with argument: %s" % args)
      # ctx = [mx.gpu(int(i)) for i in args.gpus.split(',')]
      ctx = []
      cvd = os.environ["CUDA_VISIBLE_DEVICES"].strip()
      if len(cvd) > 0:
          for i in range(len(cvd.split(","))):
              ctx.append(mx.gpu(i))
      if len(ctx) == 0:
          ctx = [mx.cpu()]
          print("use cpu")
      else:
          print("gpu num:", len(ctx))
      train_net(
          args,
          ctx,
          args.pretrained,
          args.pretrained_epoch,
          args.prefix,
          args.begin_epoch,
          args.end_epoch,
          lr=args.lr,
          lr_step=args.lr_step,
      )
  
imports: from __future__ import print_function
  import sys
  import argparse
  import os
  import pprint
  import re
  import mxnet
  import numpy
  from mxnet.module import Module
  import mxnet.optimizer
  from rcnn.logger import logger
  from rcnn.config import config, default, generate_config
  from rcnn.symbol import *
  from rcnn.core import callback, metric
  from rcnn.core.loader import CropLoader, CropLoader2
  from rcnn.core.module import MutableModule
  from rcnn.utils.load_data import load_gt_roidb, merge_roidb, filter_roidb
  from rcnn.utils.load_model import load_param
label_desc: Use image node_id 4 for calling a global function with example usage: main() without return types