code: def get_layout(self, page):
          
          if type(page) == int:
              page = self.get_page(page)
          self.interpreter.process_page(page)
          layout = self.device.get_result()
          layout = self._add_annots(layout, page.annots)
          return layout
docs: Get PDFMiner Layout object for given page object or page number.