code: def run_trainer(hparams):
      logging.basicConfig(
          format="%(asctime)s %(message)s", level=logging.INFO
      )
  
      if "multigpu" in hparams.attack_type_train:
          logging.info("Multi GPU Trainer.")
          trainer = TrainerMultiGPU(hparams)
      else:
          logging.info("Single GPU Trainer.")
          trainer = TrainerSingleGPU(hparams)
      trainer.model_train()
      trainer.eval(inc_epoch=False)
  
      return trainer.finish()
  
file_path: cleverhans/cleverhans_v3.1.0/examples/multigpu_advtrain/run_multigpu.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import logging
  from collections import namedtuple
  from cleverhans.compat import app, flags
  from trainer import TrainerMultiGPU
  from trainer import TrainerSingleGPU
label_desc: Use image node_id 1 for calling a global function with example usage: run_trainer(hparams) and returns: trainer