Cryptic code in "Preparing features and labels"

Without substantial prior knowledge of TensorFlow, I find these lines of code used in the motivating examples of week 2 highly cryptic:

dataset = dataset.flat_map(lambda window: window.batch(5))
dataset = dataset.map(lambda window: (window[:-1], window[-1:]))

dataset = dataset.batch(2).prefetch(1)

I think this would require much more explanation (tensors; datasets; nested structures; dataset.flat_map(), dataset.batch(), dataset.map(); what are the data types of the inputs / outputs of all these calls?; why do we have to do this?) to be useful for TF learners at beginner level – which seems to be who this course is targeting.

I am enjoying topics of the course but agree, a lot of cryptic code has been laid out in all 4 weeks of Course 4. I think there could be more effective ways to explain something new to learners other than simply stating “This is the code and that is the output it produces” … These topics are highly relevant for an AI career but unfortunately, code walk throughs are inadequate / overly condensed. My only suggestion to course creators for future iterations of this course is to please consider:
(1) Explaining the code instead of just reading it.

Thank you for the suggestion @adityahpatel @piliv
I shall recommend these to my seniors