新城的智能交通灯系统需要根据当前车流量car_count决定信号灯的时长。如果车流量大于threshold,则延长绿灯时间。以下哪个代码片段能最好地实现这个决策逻辑?
# 逻辑:如果 car_count > threshold,则延长绿灯
if car_count = threshold: extend_green_light()
if car_count > threshold: extend_green_light()
while car_count > threshold: extend_green_light()
for car_count in range(threshold): extend_green_light()