When asking for help on the forum, please paste all relevant code. In this case, you did not past the definition of batch_iterator.
If you are following the notebook, you did not load one dataset, but several (with a split for train/validation/test) which is why you get this error. You should add the split="train" argument when you load your dataset, or adapt the code of batch_iterator to index in your dataset dictionary.