code: def _reset_page_refs(self):
          
          if self.isClosed:
              return
          for page in self._page_refs.values():
              if page:
                  page._erase()
                  page = None
          self._page_refs.clear()
docs: Invalidate all pages in document dictionary.