code: def add_restriction(self, subject, predicate, object_):
          
          if type(object_) != rdflib.URIRef:
              object_ = self.check_thing(object_)
  
          if type(predicate) != rdflib.URIRef:
              predicate = self.check_thing(predicate)
  
          if type(subject) != infixowl.Class:
              if type(subject) != rdflib.URIRef:
                  subject = self.check_thing(subject)
              subject = infixowl.Class(subject, graph=self.g)
  
          restriction = infixowl.Restriction(predicate, graph=self.g, someValuesFrom=object_)
          subject.subClassOf = [restriction] + [c for c in subject.subClassOf]
docs: Lift normal triples into restrictions using someValuesFrom.