code: def load_config(config_file):
      def get_dataset(x):
          if not isinstance(x, str):
              return x
          result = re.match("<(\w+)\.(\w+)>", x)
          if result:
              dataset, key = result.groups()
              dataset = getattr(gv.dataset, dataset)
              file_name = getattr(dataset, key)
              return file_name
          else:
              return x
  
      with open(config_file, "r") as fin:
          cfg = EasyDict(yaml.safe_load(fin))
      cfg = gv.util.recursive_map(
          cfg, lambda x: gv.auto if x == "auto" else x
      )
      cfg = gv.util.recursive_map(cfg, get_dataset)
      if "optimizer" in cfg.build:
          cfg.build.optimizer = gv.optimizer.Optimizer(
              **cfg.build.optimizer
          )
      if "vectors" in cfg.graph:
          if isinstance(
              cfg.graph.vectors, str
          ) and cfg.graph.vectors.endswith(".npy"):
              cfg.graph.vectors = np.load(cfg.graph.vectors)
  
      return cfg
  
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 3 for calling a global function with example usage: load_config(config_file) and returns: cfg, x, file_name, x