def METHOD_NAME(self, img_info: dict) -> Union[dict, List[dict]]:
    """Parse raw annotation to target format.
    Args:
        img_info (dict): Raw image information, usually it includes
            `img_id`, `file_name`, and `xml_path`.
    Returns:
        Union[dict, List[dict]]: Parsed annotation.
    """
    data_info = {}
    img_path = osp.join(self.sub_data_root, img_info['file_name'])
    data_info['img_path'] = img_path
    data_info['img_id'] = img_info['img_id']
    data_info['xml_path'] = img_info['xml_path']
    # deal with xml file
    with get_local_path(
            img_info['xml_path'],
            backend_args=self.backend_args) as local_path:
        raw_ann_info = ET.parse(local_path)
    root = raw_ann_info.getroot()
    size = root.find('size')
    if size is not None:
        width = int(size.find('width').text)
        height = int(size.find('height').text)
    else:
        img_bytes = get(img_path, backend_args=self.backend_args)
        img = mmcv.imfrombytes(img_bytes, backend='cv2')
        height, width = img.shape[:2]
        del img, img_bytes
    data_info['height'] = height
    data_info['width'] = width
    data_info['instances'] = self._parse_instance_info(
        raw_ann_info, minus_one=True)
    return data_info