class_docstr: Base class for parsing annotations.
  
  Args:
      split (str): The split of the dataset. It is usually set automatically
          and users do not need to set it manually in config file in most
          cases.
      nproc (int): Number of processes to process the data. Defaults to 1.
          It is usually set automatically and users do not need to set it
          manually in config file in most cases.
docstr: Convert annotation for a single image.
  
  Args:
      img_path (str): The path of image.
      ann_path (str): The path of annotation.
  
  Returns:
      Tuple: A tuple of (img_path, instance).
  
      - img_path (str): The path of image file, which can be read
        directly by opencv.
      - instance: instance is a list of dict containing parsed
        annotations, which should contain the following keys:
  
        - 'poly' or 'box' (textdet or textspotting)
        - 'text' (textspotting or textrecog)
        - 'ignore' (all task)
  
  Examples:
  An example of returned values:
  >>> ('imgs/train/xxx.jpg',
  >>> dict(
  >>>    poly=[[[0, 1], [1, 1], [1, 0], [0, 0]]],
  >>>    text='hello',
  >>>    ignore=False)
  >>> )
code: def parse_file(self, img_path: str, ann_path: str) -> Tuple:
      """Convert annotation for a single image.
  
      Args:
          img_path (str): The path of image.
          ann_path (str): The path of annotation.
  
      Returns:
          Tuple: A tuple of (img_path, instance).
  
          - img_path (str): The path of image file, which can be read
            directly by opencv.
          - instance: instance is a list of dict containing parsed
            annotations, which should contain the following keys:
  
            - 'poly' or 'box' (textdet or textspotting)
            - 'text' (textspotting or textrecog)
            - 'ignore' (all task)
  
      Examples:
      An example of returned values:
      >>> ('imgs/train/xxx.jpg',
      >>> dict(
      >>>    poly=[[[0, 1], [1, 1], [1, 0], [0, 0]]],
      >>>    text='hello',
      >>>    ignore=False)
      >>> )
      """
      raise NotImplementedError
  
file_path: mmocr/mmocr/datasets/preparers/parsers/base.py
imports: from abc import abstractmethod
  from typing import Dict, List, Tuple, Union
  from mmocr.utils import track_parallel_progress_multi_args
label_desc: Use image node_id 4 for calling the BaseParser obj's underlying member method code with example usage: obj.parse_file(img_path, ann_path) without return types