code: def store(self):
      extension = self.params.pred_extension
      if self._last_page_id:
          self._store_page(extension, self._last_page_id)
          self._last_page_id = None
      else:
          for xml in tqdm(
              self.params.xmlfiles,
              desc="Writing PageXML files",
              total=len(self.params.xmlfiles),
          ):
              page = self.pages(split_all_ext(xml)[0])
              with open(
                  split_all_ext(xml)[0] + extension,
                  "w",
                  encoding="utf-8",
              ) as f:
                  f.write(
                      etree.tounicode(
                          page.getroottree(), pretty_print=True
                      )
                  )
  
imports: import os
  from copy import deepcopy
  from dataclasses import dataclass, field
  from random import shuffle
  import math
  import numpy
  from paiargparse import pai_dataclass, pai_meta
  from tfaip.data.pipeline.definitions import PipelineMode, INPUT_PROCESSOR, TARGETS_PROCESSOR
  from tqdm import tqdm
  from lxml import etree
  import cv2
  from typing import List, Generator, Optional, Iterable, Dict, Any, Tuple
  from enum import IntEnum
  from calamari_ocr.ocr.dataset.datareader.base import CalamariDataGenerator, CalamariDataGeneratorParams, InputSample, SampleMeta
  from calamari_ocr.utils import split_all_ext, filename, glob_all
  from calamari_ocr.ocr.predict.params import Prediction
  import logging
label_desc: Use image node_id 6 for calling the PageXMLReader obj's underlying member method code with example usage: obj.store() without return types