code: def test_page():
      page = np.zeros((300, 200, 3), dtype=np.uint8)
      page_idx = 0
      page_size = (300, 200)
      orientation = {"value": 0.0, "confidence": 0.0}
      language = {"value": "EN", "confidence": 0.8}
      blocks = _mock_blocks()
      page = elements.Page(
          page, blocks, page_idx, page_size, orientation, language
      )
  
      # Attribute checks
      assert len(page.blocks) == len(blocks)
      assert all(isinstance(b, elements.Block) for b in page.blocks)
      assert isinstance(page.page, np.ndarray)
      assert page.page_idx == page_idx
      assert page.dimensions == page_size
      assert page.orientation == orientation
      assert page.language == language
  
      # Render
      assert (
          page.render()
          == "hello world\nhello world\n\nhello world\nhello world"
      )
  
      # Export
      assert page.export() == {
          "blocks": [b.export() for b in blocks],
          "page_idx": page_idx,
          "dimensions": page_size,
          "orientation": orientation,
          "language": language,
      }
  
      # Export XML
      assert (
          isinstance(page.export_as_xml(), tuple)
          and isinstance(page.export_as_xml()[0], (bytes, bytearray))
          and isinstance(page.export_as_xml()[1], ElementTree)
      )
  
      # Repr
      assert (
          "\n".join(repr(page).split("\n")[:2])
          == f"Page(\n  dimensions={page_size!r}"
      )
  
      # Show
      page.show(block=False)
  
      # Synthesize
      img = page.synthesize()
      assert isinstance(img, np.ndarray)
      assert img.shape == (*page_size, 3)
  
imports: from xml.etree.ElementTree import ElementTree
  import numpy
  import pytest
  from doctr.file_utils import CLASS_NAME
  from doctr.io import elements
label_desc: Use image node_id 14 for calling a global function with example usage: test_page() without return types