code: def _propagate_glyph_anchors(glyphSet, composite, processed):
      if composite.name in processed:
          return
      processed.add(composite.name)
      if not composite.components:
          return
      base_components = []
      mark_components = []
      anchor_names = set()
      to_add = {}
      for component in composite.components:
          try:
              glyph = glyphSet[component.baseGlyph]
          except KeyError:
              logger.warning(
                  'Anchors not propagated for inexistent component {} '
                  'in glyph {}'.format(component.baseGlyph, composite.name))
          else:
              _propagate_glyph_anchors(glyphSet, glyph, processed)
              if any(a.name.startswith('_') for a in glyph.anchors):
                  mark_components.append(component)
              else:
                  base_components.append(component)
                  anchor_names |= {a.name for a in glyph.anchors}
      if mark_components and not base_components and _is_ligature_mark(composite):
          try:
              component = _component_closest_to_origin(mark_components, glyphSet)
          except Exception as e:
              raise Exception(
                  "Error while determining which component of composite "
                  "'{}' is the lowest: {}".format(composite.name, str(e))
              )
          mark_components.remove(component)
          base_components.append(component)
          glyph = glyphSet[component.baseGlyph]
          anchor_names |= {a.name for a in glyph.anchors}
      for anchor_name in anchor_names:
          if not any(a.name.startswith(anchor_name) for a in composite.anchors):
              _get_anchor_data(to_add, glyphSet, base_components, anchor_name)
      for component in mark_components:
          _adjust_anchors(to_add, glyphSet, component)
      for name, (x, y) in sorted(to_add.items()):
          anchor_dict = {'name': name, 'x': x, 'y': y}
          try:
              composite.appendAnchor(anchor_dict)
          except TypeError:
              composite.appendAnchor(name, (x, y))