def fo():
    for i in range():
        if i == 1:
            do()
            a = 1
        else:
            does()
