code: def _store_glyph(
      self,
      glyph,
      word_id,
      word_xml,
      line_x,
      line_y,
      line_height,
      glyph_counter,
      ns,
  ):
      glyph_id = f"{word_id}g{str(glyph_counter)}"
  
      glyph_xml = word_xml.find(
          f'./ns:Glyph[@id="{glyph_id}"]', namespaces=ns
      )
      if glyph_xml is None:
          glyph_xml = self._make_subelement(
              word_xml, "Glyph", attrib={"id": glyph_id}
          )
  
      coords_xml = glyph_xml.find("./ns:Coords", namespaces=ns)
      if coords_xml is None:
          coords_xml = self._make_subelement(glyph_xml, "Coords")
  
      glyph_x, glyph_y = glyph.global_start + line_x, line_y
      glyph_width, glyph_height = (
          glyph.global_end - glyph.global_start,
          line_height,
      )
      coords_xml.set(
          "points",
          self._coords_for_rectangle(
              glyph_x, glyph_y, glyph_width, glyph_height
          ),
      )
  
      for index in range(
          min(len(glyph.chars), self.params.max_glyph_alternatives)
      ):
          char, confidence = (
              glyph.chars[index].char,
              glyph.chars[index].probability,
          )
  
          glyph_index = self.params.text_index + index
  
          textequiv_xml = glyph_xml.find(
              f'./ns:TextEquiv[@index="{glyph_index}"]', namespaces=ns
          )
          if textequiv_xml is None:
              textequiv_xml = self._make_subelement(
                  glyph_xml, "TextEquiv"
              )
              textequiv_xml.set("index", str(glyph_index))
  
          if self.params.output_confidences:
              textequiv_xml.set("conf", str(confidence))
  
          u_xml = textequiv_xml.find("./ns:Unicode", namespaces=ns)
          if u_xml is None:
              u_xml = self._make_subelement(textequiv_xml, "Unicode")
          u_xml.text = char
  
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 13 for calling the PageXMLReader obj's underlying member method code with example usage: obj._store_glyph(glyph, word_id, word_xml, line_x, line_y, line_height, glyph_counter, ns) without return types