def METHOD_NAME(args):
    parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
    parser.add_argument("--recipe", dest="recipe", help="The recipe file to convert.", required=True)
    parser.add_argument("--output", dest="output", help="Where to write the script to")
    parser.add_argument("--build-root", dest="build_root", default="/tmp/", help="Where to set BUILD_ROOT")
    parser.add_argument("--num-jobs", dest="num_jobs", default="4", help="What to set MOOSE_JOBS to")
    parser.add_argument("--head", nargs=3, dest="head", help="Head repo to work on. Format is: repo branch sha", required=True)
    parser.add_argument("--base", nargs=3, dest="base", help="Base repo to work on. Format is: repo branch sha", required=True)
    group = parser.add_mutually_exclusive_group(required=True)
    group.add_argument("--pr", action="store_true")
    group.add_argument("--push", action="store_true")
    group.add_argument("--manual", action="store_true")
    parsed = parser.parse_args(args)
    dirname = os.path.dirname(os.path.realpath(__file__))
    parent_dir = os.path.dirname(dirname)
    # RecipeReader takes a relative path from the base repo directory
    real_path = os.path.realpath(parsed.recipe)
    rel_path = os.path.relpath(real_path, parent_dir)
    try:
        reader = RecipeReader(parent_dir, rel_path)
        recipe = reader.read()
    except Exception as e:
        print("Recipe '%s' is not valid: %s" % (real_path, e))
        return 1
    try:
        script = recipe_to_bash(recipe,
            base_repo=parsed.base[0],
            base_branch=parsed.base[1],
            base_sha=parsed.base[2],
            head_repo=parsed.head[0],
            head_branch=parsed.head[1],
            head_sha=parsed.head[2],
            pr=parsed.pr,
            push=parsed.push,
            manual=parsed.manual,
            build_root=parsed.build_root,
            moose_jobs=parsed.num_jobs,
            args=args,
            )
        if parsed.output:
            with open(parsed.output, "w") as f:
                f.write(script)
        else:
            print(script)
    except Exception as e:
        print("Failed to convert recipe: %s" % e)
        return 1