Example: http://mbostock.github.com/d3/ex/bubble.html

I'm having a hard time understanding what goes on with line 16:
.data(bubble.nodes(classes(json))
And why, or where within the classes() function, the variable classes[] gets x,y,r values defined for each of its objects. Also, bubble.nodes() doesn't appear to be an actual function?
If I add a
console.log(classes)
between lines 44 and 45 - every object inside seems to be populated with x,y,r already -- but it is not apparent why this happens.