code: def override_config(config, options=None):
      """
      Recursively override the config
      Args:
          config(dict): dict to be replaced
          options(list): list of pairs(key0.key1.idx.key2=value)
              such as: [
                  'topk=2',
                  'VALID.transforms.1.ResizeImage.resize_short=300'
              ]
      Returns:
          config(dict): replaced config
      """
      if options is not None:
          for opt in options:
              assert isinstance(
                  opt, str
              ), "option({}) should be a str".format(opt)
              assert "=" in opt, (
                  "option({}) should contain a ="
                  "to distinguish between key and value".format(opt)
              )
              pair = opt.split("=")
              assert (
                  len(pair) == 2
              ), "there can be only a = in the option"
              key, value = pair
              keys = key.split(".")
              override(config, keys, value)
      return config
  
file_path: PaddleHub/modules/image/classification/pplcnet_x2_0_imagenet/utils.py
imports: import argparse
  import copy
  import os
  import yaml
label_desc: Use image node_id 4 for calling a global function with example usage: override_config(config, options) and returns: config