code: def baseline_main(args):
      config_path = get_config_path()
  
      configs = []
      for path, dirs, files in os.walk(config_path):
          for file in files:
              file = os.path.join(path, file)
              match = True
              for keyword in args.keywords:
                  result = re.search(
                      r"[/\\_.]%s[/\\_.]" % keyword, file
                  )
                  if not result:
                      match = False
                      break
              if match:
                  configs.append(file)
      if len(configs) == 0:
          raise ValueError(
              "Can't find a baseline with keywords: %s"
              % ", ".join(args.keywords)
          )
      if len(configs) > 1:
          configs = sorted(configs)
          configs = [""] + [
              os.path.relpath(config, config_path) for config in configs
          ]
          raise ValueError(
              "Ambiguous keywords. Candidates are:%s"
              % "\n    ".join(configs)
          )
  
      config = configs[0]
      print(
          "running baseline: %s" % os.path.relpath(config, config_path)
      )
      cfg = load_config(config)
      if args.gpu is not None:
          cfg.resource.gpus = range(args.gpu)
      if args.cpu is not None:
          cfg.resource.cpu_per_gpu = args.cpu
      if args.epoch is not None:
          cfg.train.num_epoch = args.epoch
  
      app = gap.Application(cfg.application, **cfg.resource)
      app.load(**cfg.graph)
      app.build(**cfg.build)
      if "load" in cfg:
          app.load_model(**cfg.load)
      app.train(**cfg.train)
      if args.eval and "evaluate" in cfg:
          if isinstance(cfg.evaluate, dict):
              cfg.evaluate = [cfg.evaluate]
          for evaluation in cfg.evaluate:
              app.evaluate(**evaluation)
      if "save" in cfg:
          app.save_model(**cfg.save)
  
imports: from __future__ import print_function, absolute_import
  import os
  import re
  import glob
  import yaml
  import shutil
  import logging
  import argparse
  from easydict import EasyDict
  import numpy
  import graphvite
  import graphvite.application
label_desc: Use image node_id 7 for calling a global function with example usage: baseline_main(args) without return types