code: def override(dl, ks, v):
      """
      Recursively replace dict of list
      Args:
          dl(dict or list): dict or list to be replaced
          ks(list): list of keys
          v(str): value to be replaced
      """
  
      def str2num(v):
          try:
              return eval(v)
          except Exception:
              return v
  
      assert isinstance(
          dl, (list, dict)
      ), "{} should be a list or a dict"
      assert len(ks) > 0, "lenght of keys should larger than 0"
      if isinstance(dl, list):
          k = str2num(ks[0])
          if len(ks) == 1:
              assert k < len(dl), "index({}) out of range({})".format(
                  k, dl
              )
              dl[k] = str2num(v)
          else:
              override(dl[k], ks[1:], v)
      else:
          if len(ks) == 1:
              # assert ks[0] in dl, ('{} is not exist in {}'.format(ks[0], dl))
              if not ks[0] in dl:
                  print("A new filed ({}) detected!".format(ks[0], dl))
              dl[ks[0]] = str2num(v)
          else:
              override(dl[ks[0]], ks[1:], v)
  
file_path: PaddleHub/modules/image/classification/pplcnet_x0_75_imagenet/utils.py
imports: import argparse
  import copy
  import os
  import yaml
label_desc: Use image node_id 3 for calling a global function with example usage: override(dl, ks, v) and returns: eval, v