In many manga and anime involving modern schools, there is a scene on or at least showing the rooftop of the building. It is a place students can freely go to, often depicted with having a bust-height railing along the edge and the typical 'small building' from which you leave the school building, often also having a ladder to get up (nonetheless being a popular 'hiding' or 'being alone' spot even without one).
I wanted to ask: is this one of many clichés about Japanese culture that appear throughout the whole media type, or are they a common thing in Japanese schools?