<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_rebuild(subparsers):
 """Rebuild Pipeline subcommands."""

    rebuild_parser = subparsers.add_parser(
        'rebuild', help=runner.rebuild_pipelines.__doc__, formatter_class=argparse.ArgumentDefaultsHelpFormatter)
    rebuild_parser.set_defaults(func=runner.rebuild_pipelines)
    rebuild_parser.add_argument('-a', '--all', action='store_true', help='Rebuild all Pipelines')
    rebuild_parser.add_argument(
        'project',
        nargs='?',
        default=os.getenv('REBUILD_PROJECT'),
        help='Project to rebuild, overrides $REBUILD_PROJECT')