def _propagate_glyph_anchors(self, ufo, parent, processed):
if parent.name in processed:<EOL><INDENT>return<EOL><DEDENT>processed.add(parent.name)<EOL>base_components = []<EOL>mark_components = []<EOL>anchor_names = set()<EOL>to_add = {}<EOL>for component in parent.components:<EOL><INDENT>try:<EOL><INDENT>glyph = ufo[component.baseGlyph]<EOL><DEDENT>except KeyError:<EOL><INDENT>self.logger.warning(<EOL>"<STR_LIT>".format(<EOL>component.baseGlyph, parent.name<EOL>)<EOL>)<EOL><DEDENT>else:<EOL><INDENT>_propagate_glyph_anchors(self, ufo, glyph, processed)<EOL>if any(a.name.startswith("<STR_LIT:_>") for a in glyph.anchors):<EOL><INDENT>mark_components.append(component)<EOL><DEDENT>else:<EOL><INDENT>base_components.append(component)<EOL>anchor_names |= {a.name for a in glyph.anchors}<EOL><DEDENT><DEDENT><DEDENT>for anchor_name in anchor_names:<EOL><INDENT>if not any(a.name.startswith(anchor_name) for a in parent.anchors):<EOL><INDENT>_get_anchor_data(to_add, ufo, base_components, anchor_name)<EOL><DEDENT><DEDENT>for component in mark_components:<EOL><INDENT>_adjust_anchors(to_add, ufo, component)<EOL><DEDENT>for name, (x, y) in sorted(to_add.items()):<EOL><INDENT>anchor_dict = {"<STR_LIT:name>": name, "<STR_LIT:x>": x, "<STR_LIT:y>": y}<EOL>parent.appendAnchor(glyph.anchorClass(anchorDict=anchor_dict))<EOL><DEDENT>
Propagate anchors for a single parent glyph.