code: def deepvalidation(self):
          
          if self.doc and self.doc.deepvalidation and self.set and self.set[0] != '_':
              try:
                  self.doc.setdefinitions[self.set].testclass(self.cls)
              except KeyError:
                  if self.cls and not self.doc.allowadhocsets:
                      raise DeepValidationError("Set definition " + self.set + " for " + self.XMLTAG + " not loaded!")
              except DeepValidationError as e:
                  errormsg =  str(e) + " (in set " + self.set+" for " + self.XMLTAG
                  if self.id:
                      errormsg += " with ID " + self.id
                  errormsg += ")"
                  raise DeepValidationError(errormsg)
docs: Perform deep validation of this element.
  
          Raises:
              :class:`DeepValidationError`