def METHOD_NAME(cfg, arg):
    merge_cfg = copy.deepcopy(cfg)
    # merge opt
    if 'opt' in arg.keys() and arg['opt']:
        for name, value in arg['opt'].items(
        ):  # example: {'MOT': {'batch_size': 3}}
            if name not in merge_cfg.keys():
                print("No", name, "in config file!")
                continue
            for sub_k, sub_v in value.items():
                if sub_k not in merge_cfg[name].keys():
                    print("No", sub_k, "in config file of", name, "!")
                    continue
                merge_cfg[name][sub_k] = sub_v
    return merge_cfg