<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setup_parser_common(parser):
 """Parser setup common to both rez-build and rez-release."""

    from rez.build_process_ import get_build_process_types
    from rez.build_system import get_valid_build_systems

    process_types = get_build_process_types()
    parser.add_argument(
        "--process", type=str, choices=process_types, default="local",
        help="the build process to use (default: %(default)s).")

    # add build system choices valid for this package
    package = get_current_developer_package()
    clss = get_valid_build_systems(os.getcwd(), package=package)

    if clss:
        if len(clss) == 1:
            cls_ = clss[0]
            title = "%s build system arguments" % cls_.name()
            group = parser.add_argument_group(title)
            cls_.bind_cli(parser, group)

        types = [x.name() for x in clss]
    else:
        types = None

    parser.add_argument(
        "-b", "--build-system", dest="buildsys", choices=types,
        help="the build system to use. If not specified, it is detected. Set "
        "'build_system' or 'build_command' to specify the build system in the "
        "package itself.")

    parser.add_argument(
        "--variants", nargs='+', type=int, metavar="INDEX",
        help="select variants to build (zero-indexed).")
    parser.add_argument(
        "--ba", "--build-args", dest="build_args", metavar="ARGS",
        help="arguments to pass to the build system. Alternatively, list these "
        "after a '--'.")
    parser.add_argument(
        "--cba", "--child-build-args", dest="child_build_args", metavar="ARGS",
        help="arguments to pass to the child build system, if any. "
        "Alternatively, list these after a second '--'.")