def METHOD_NAME(stream):
    headers = stream.authenticator.get_auth_header()
    response = create_note(stream, headers)
    assert response.status_code == 201, "Note was note created"
    created_note_id = response.json()["id"]
    # A record may not be accessible right after creation. This workaround makes few attempts to receive latest record
    notes = []
    attempts = 10
    while created_note_id not in notes:
        now = pendulum.now(tz="UTC")
        stream_slice = {
            "start_date": now.add(days=-1).isoformat(timespec="milliseconds"),
            "end_date": now.isoformat(timespec="milliseconds")
        }
        notes = set(record["Id"] for record in stream.read_records(sync_mode=SyncMode.full_refresh, stream_slice=stream_slice))
        try:
            assert created_note_id in notes, "No created note during the sync"
            break
        except Exception as e:
            if attempts:
                time.sleep(2)
            else:
                raise e
        attempts = attempts - 1
    response = update_note(stream, created_note_id, headers)
    assert response.status_code == 204, "Note was not updated"
    stream_state = get_stream_state()
    response = delete_note(stream, created_note_id, headers)
    assert response.status_code == 204, "Note was not deleted"
    # A record updates take some time to become accessible
    attempts = 10
    while created_note_id not in notes:
        now = pendulum.now(tz="UTC")
        stream_slice = {
            "start_date": now.add(days=-1).isoformat(timespec="milliseconds"),
            "end_date": now.isoformat(timespec="milliseconds")
        }
        record = None
        for record in stream.read_records(sync_mode=SyncMode.incremental, stream_state=stream_state, stream_slice=stream_slice):
            if created_note_id == record["Id"]:
                break
        try:
            assert record, "No updated note during the sync"
            assert record["IsDeleted"], "Wrong field value for deleted note during the sync"
            assert record["TextPreview"] == UPDATED_NOTE_CONTENT and record["TextPreview"] != NOTE_CONTENT, "Note Content was not updated"
            break
        except Exception as e:
            if attempts:
                time.sleep(2)
            else:
                raise e
        attempts = attempts - 1