def create_error(change, message='message', attempts=0, pillow=None, ex_class=None):
    error = PillowError.get_or_create(change, pillow or FakePillow())
    for n in range(0, attempts):
        error.add_attempt(*get_ex_tb(message, ex_class=ex_class))
    return error
dataset/ETHPy150Open dimagi/commcare-hq/corehq/ex-submodules/pillow_retry/tests.py/create_error/original