Anchors from components not seen in script

I have a glyph pa-deva that has aaMatra-deva as a component. aaMatra-deva has top and bottom anchors defined. pa-deva does not have any anchors defined. I assumed that the anchors from aaMatra-deva will ‘shine through’.

However, when I tried to access the anchors in pa-deva via: Glyphs.font.glyphs['pa-deva'].layers['Regular'].anchors['top'], I do not get any anchors. Do I have to define anchors in pa-deva if need to access them in scripts?

can need to call layer.anchorsTraversingComponents(). layer.anchors only has the anchors that are defined in that layer.