class_docstr: Load and process the ``instances`` annotation provided by dataset.
  
  The annotation format is as the following:
  
  .. code-block:: python
  
      {
          # A nested list of 4 numbers representing the bounding box of the
          # instance, in (x1, y1, x2, y2) order.
          'bbox': np.array([[x1, y1, x2, y2], [x1, y1, x2, y2], ...],
                           dtype=np.int32),
  
          # Labels of boxes. Shape is (N,).
          'bbox_labels': np.array([0, 2, ...], dtype=np.int32),
  
          # Labels of edges. Shape (N, N).
          'edge_labels': np.array([0, 2, ...], dtype=np.int32),
  
          # List of texts.
          "texts": ['text1', 'text2', ...],
      }
  
  After this module, the annotation has been changed to the format below:
  
  .. code-block:: python
  
      {
          # In (x1, y1, x2, y2) order, float type. N is the number of bboxes
          # in np.float32
          'gt_bboxes': np.ndarray(N, 4),
          # In np.int64 type.
          'gt_bboxes_labels': np.ndarray(N, ),
          # In np.int32 type.
          'gt_edges_labels': np.ndarray(N, N),
          # In list[str]
          'gt_texts': list[str],
          # tuple(int)
          'ori_shape': (H, W)
      }
  
  Required Keys:
  
  - bboxes
  - bbox_labels
  - edge_labels
  - texts
  
  Added Keys:
  
  - gt_bboxes (np.float32)
  - gt_bboxes_labels (np.int64)
  - gt_edges_labels (np.int64)
  - gt_texts (list[str])
  - ori_shape (tuple[int])
  
  Args:
      with_bbox (bool): Whether to parse and load the bbox annotation.
          Defaults to True.
      with_label (bool): Whether to parse and load the label annotation.
          Defaults to True.
      with_text (bool): Whether to parse and load the text annotation.
          Defaults to True.
      directed (bool): Whether build edges as a directed graph.
          Defaults to False.
      key_node_idx (int, optional): Key node label, used to mask out edges
          that are not connected from key nodes to value nodes. It has to be
          specified together with ``value_node_idx``. Defaults to None.
      value_node_idx (int, optional): Value node label, used to mask out
          edges that are not connected from key nodes to value nodes. It has
          to be specified together with ``key_node_idx``. Defaults to None.
code: def __repr__(self) -> str:
      repr_str = self.__class__.__name__
      repr_str += f"(with_bbox={self.with_bbox}, "
      repr_str += f"with_label={self.with_label}, "
      repr_str += f"with_text={self.with_text})"
      return repr_str
  
imports: import copy
  import warnings
  from typing import Optional, Union
  import mmcv
  import mmengine.fileio
  import numpy
  from mmcv.transforms import BaseTransform
  from mmcv.transforms import LoadAnnotations
  from mmcv.transforms import LoadImageFromFile
  from mmocr.registry import TRANSFORMS
label_desc: Use image node_id 5 for calling the LoadKIEAnnotations obj's underlying member method code with example usage: obj.__repr__() and returns: repr_str