def METHOD_NAME(s, ct):
    heading = ct.heading.strip()
    m = re.search(r"\[([\w\- ]+)\]", heading)
    if m:
        mvd = m.group(1)
        g.add((s, fqdn("hasContext"), rdflib.Literal(mvd)))
        li = [c for c in heading]
        li[slice(*m.span())] = []
        heading = (mvd, "".join(li).strip())
    g.add((s, fqdn("hasCleanHeading"), rdflib.Literal(heading)))
    g.add((s, fqdn("hasHeading"), rdflib.Literal(ct.heading)))
    if ct.content.strip():
        g.add((s, fqdn("hasText"), rdflib.Literal(ct.content)))
    for i, ch in enumerate(ct.children):
        s2 = s + f"_{i}"
        g.add((s2, fqdn("containedIn"), s))
        METHOD_NAME(s2, ch)