You can retake the level assessment up to 3 times. After failing the same level assessment 3 times, you must retake the level from the very beginning.
There is no limit to how many times you can go through this cycle of failing the test and retaking the level.