def test(a, b=1):
    if a:
        print(a)
    else:
        for n in range(10):

    <caret>        print(b)
