def METHOD_NAME(parser, argv):
    args = parser.METHOD_NAME(argv)
    if "export" in args.mode and args.to_onnx is None:
        raise RuntimeError("--mode export requires --to-onnx argument to be set")
    return args