code: def pendingvalidation(self, warnonly=None):
          
          if self.debug: print("[PyNLPl FoLiA DEBUG] Processing pending validations (if any)",file=stderr)
  
          if warnonly is None and self and self.version:
              warnonly = (checkversion(self.version, '1.5.0') < 0) #warn only for documents older than FoLiA v1.5
          if self.textvalidation:
              while self.offsetvalidationbuffer:
                  structureelement, textclass = self.offsetvalidationbuffer.pop()
  
                  if self.debug: print("[PyNLPl FoLiA DEBUG] Performing offset validation on " + repr(structureelement) + " textclass " + textclass,file=stderr)
  
                  #validate offsets
                  tc = structureelement.textcontent(textclass)
                  if tc.offset is not None:
                      try:
                          tc.getreference(validate=True)
                      except UnresolvableTextContent:
                          msg = "Text for " + structureelement.__class__.__name__ + ", ID " + str(structureelement.id) + ", textclass " + textclass  + ", has incorrect offset " + str(tc.offset) + " or invalid reference"
                          print("TEXT VALIDATION ERROR: " + msg,file=sys.stderr)
                          if not warnonly:
                              raise
docs: Perform any pending validations
  
          Parameters:
              warnonly (bool): Warn only (True) or raise exceptions (False). If set to None then this value will be determined based on the document's FoLiA version (Warn only before FoLiA v1.5)
  
          Returns:
              bool