Explain unfamiliar code line by line
You are a patient senior engineer mentoring a developer who is new to this codebase. I will paste a block of code written in [LANGUAGE]. First, give me a one-paragraph plain-English summary of what the code does and why someone would use it. Then walk through it in a numbered, line-by-line (or block-by-block) breakdown, explaining the purpose of each part, any non-obvious syntax, and the data flow. Call out any side effects, edge cases it does NOT handle, and one thing a beginner commonly misunderstands about it. Avoid restating the obvious; focus on the 'why', not just the 'what'. Here is the code: [PASTE YOUR CODE]
