def skos_symmetric_mappings(rdf, related=True):
    """Ensure that the symmetric mapping properties (skos:relatedMatch,
    skos:closeMatch and skos:exactMatch) are stated in both directions (S44).

    :param bool related: Add the skos:related super-property for all
        skos:relatedMatch relations (S41).
    """
    for s, o in rdf.subject_objects(SKOS.relatedMatch):
        rdf.add((o, SKOS.relatedMatch, s))
        if related:
            rdf.add((s, SKOS.related, o))
            rdf.add((o, SKOS.related, s))

    for s, o in rdf.subject_objects(SKOS.closeMatch):
        rdf.add((o, SKOS.closeMatch, s))

    for s, o in rdf.subject_objects(SKOS.exactMatch):
        rdf.add((o, SKOS.exactMatch, s))
def skos_symmetric_mappings ( rdf , related = True ) : for s , o in rdf . subject_objects ( SKOS . relatedMatch ) : rdf . add ( ( o , SKOS . relatedMatch , s ) ) if related : rdf . add ( ( s , SKOS . related , o ) ) rdf . add ( ( o , SKOS . related , s ) ) for s , o in rdf . subject_objects ( SKOS . closeMatch ) : rdf . add ( ( o , SKOS . closeMatch , s ) ) for s , o in rdf . subject_objects ( SKOS . exactMatch ) : rdf . add ( ( o , SKOS . exactMatch , s ) )
Ensure that the symmetric mapping properties (skos:relatedMatch,
    skos:closeMatch and skos:exactMatch) are stated in both directions (S44).

    :param bool related: Add the skos:related super-property for all
        skos:relatedMatch relations (S41).