code: def __init__(self, dictionary):
      if isinstance(dictionary, dict):
          self.dictionary = TASK_UTILS.build(dictionary)
      else:
          raise TypeError(
              "The type of dictionary should be `Dictionary` or dict, "
              f"but got {type(dictionary)}"
          )
  
imports: import random
  from typing import Dict
  import numpy
  from mmcv.transforms.base import BaseTransform
  from mmocr.datasets.transforms import LoadOCRAnnotations
  from mmocr.registry import TASK_UTILS, TRANSFORMS
  from mmocr.utils import bezier2poly, poly2bezier
label_desc: Use image node_id 1 to create a new ConvertText object from inherited base classes: BaseTransform with example: obj = ConvertText(dictionary)