def fo():
    for i in range():
        if i == 1:
            do()
<caret>        else:
            does()
