def annotate(pre, post, callable, words):
    state = False
    i = random.randint(0, 4)
    while i < len(words):
        if ' ' in words[i] or '\n' in words[i]:  # skip spaces
            i += 1
            continue
        if not state:
            words[i] = pre.format(callable(), words[i])
        else:
            words[i] = post.format(words[i])
        state = not state
        i += random.randint(1, 7)
dataset/ETHPy150Open kivy/kivy/kivy/tests/visual_test_label.py/annotate/original