def argument_preprocessor(args):
    # CMake/make pass-through flags collect dashed options. They require special
    # handling or argparse will complain about unrecognized options.
    # NOTE: http://bugs.python.org/issue9334
    args = sys.argv[1:] if args is None else args
    extract_make_args = extract_cmake_and_make_and_catkin_make_arguments
    args, cmake_args, make_args, catkin_make_args = extract_make_args(args)

    # Extract make jobs flags (these override MAKEFLAGS later on)
    jobs_args = extract_jobs_flags(' '.join(args))
    if len(jobs_args) > 0:
        # Remove jobs flags from cli args if they're present
        args = re.sub(' '.join(jobs_args), '', ' '.join(args)).split()
    elif make_args is not None:
        jobs_args = extract_jobs_flags(' '.join(make_args))
        if len(jobs_args) > 0:
            # Remove jobs flags from cli args if they're present
            make_args = re.sub(' '.join(jobs_args), '', ' '.join(make_args)).split()

    extras = {
        'cmake_args': cmake_args,
        'make_args': make_args,
        'jobs_args': jobs_args,
        'catkin_make_args': catkin_make_args,
    }

    return args, extras
Perform processing of argument patterns which are not captured by
dataset/ETHPy150Open catkin/catkin_tools/catkin_tools/argument_parsing.py/argument_preprocessor