def METHOD_NAME(args, cfg=None):
    import onnxruntime as ort
    onnx_file = args.onnx_file
    config = ort.SessionOptions()
    if args.use_gpu:
        raise ValueError(
            "onnx inference now only supports cpu! please set `use_gpu` to False."
        )
    else:
        config.intra_op_num_threads = args.cpu_threads
        if args.ir_optim:
            config.graph_optimization_level = ort.GraphOptimizationLevel.ORT_ENABLE_ALL
    predictor = ort.InferenceSession(onnx_file, sess_options=config)
    return config, predictor