def METHOD_NAME(**kwargs):
    args = parse_args()
    cfg = get_config(args.config, overrides=args.override)
    # ToDo To AP-kai: 下面这行代码目的是更新配置，这样的话我们调用main(use_npu = Ture)，这时cfg.use_npu就是Ture了
    for key, value in kwargs.items():
        cfg.__setattr__(key, value)
    # set seed if specified
    seed = args.seed
    if seed is not None:
        assert isinstance(
            seed,
            int), f"seed must be a integer when specified, but got {seed}"
        paddle.seed(seed)
        np.random.seed(seed)
        random.seed(seed)
    _, world_size = get_dist_info()
    parallel = world_size != 1
    if parallel:
        paddle.distributed.init_parallel_env()
    final = test_model(cfg, weights=args.weights, parallel=parallel)
    return final