code: def _getNewXref(self):
          
          if self.isClosed or self.isEncrypted:
              raise ValueError("operation illegal for closed / encrypted doc")
  
          return _fitz.Document__getNewXref(self)
docs: _getNewXref(self) -> PyObject *