code: def cleanup_properties(rdf):
      
      for t in (RDF.Property, OWL.DatatypeProperty, OWL.ObjectProperty,
                OWL.SymmetricProperty, OWL.TransitiveProperty,
                OWL.InverseFunctionalProperty, OWL.FunctionalProperty):
          for prop in rdf.subjects(RDF.type, t):
              if prop.startswith(SKOS):
                  logging.debug(
                      "removing SKOS property definition: %s", prop)
                  replace_subject(rdf, prop, None)
                  continue
              if prop.startswith(DC):
                  logging.debug("removing DC property definition: %s", prop)
                  replace_subject(rdf, prop, None)
                  continue
  
              # if there are triples using the property, keep the property def
              if len(list(rdf.subject_objects(prop))) > 0:
                  continue
  
              logging.debug("removing unused property definition: %s", prop)
              replace_subject(rdf, prop, None)
docs: Remove unnecessary property definitions.
  
      Reemoves SKOS and DC property definitions and definitions of unused
      properties.