code: def skos_transitive(rdf, narrower=True):
      
      for conc in rdf.subjects(RDF.type, SKOS.Concept):
          for bt in rdf.transitive_objects(conc, SKOS.broader):
              if bt == conc:
                  continue
              rdf.add((conc, SKOS.broaderTransitive, bt))
              if narrower:
                  rdf.add((bt, SKOS.narrowerTransitive, conc))
docs: Perform transitive closure inference (S22, S24).