def METHOD_NAME():
    args = parse_args()
    validate_output_dir(args.output_dir)
    configure_logging(run_id=args.run_id, output_dir=args.output_dir)
    proc = run_command(command=args.command, run_id=args.run_id)
    threads = [
        threading.Thread(target=stream, args=p, daemon=True)
        for p in [(proc.stdout, sys.stdout), (proc.stderr, sys.stderr)]
    ]
    for t in threads:
        t.start()
    returncode = run_proc(output_path=args.output_dir, run_id=args.run_id, command=args.command, proc=proc,)
    for t in threads:
        t.join()
    return returncode