docstr: Args:
      results (dict): Result dict containing the data to transform.
  
  Returns:
      Optional[dict]: The transformed data. If all the polygons are
      unfixable, return None.
docstr_tok: ["Args",":","results","(","dict",")",":","Result","dict","containing","the","data","to","transform",".","Returns",":","Optional","[","dict","]",":","The","transformed","data",".","If","all","the","polygons","are","unfixable",",","return","None","."]
code: def transform(self, results: Dict) -> Dict:
      """
  
      Args:
          results (dict): Result dict containing the data to transform.
  
      Returns:
          Optional[dict]: The transformed data. If all the polygons are
          unfixable, return None.
      """
      new_gt_texts = []
      for gt_text in results["gt_texts"]:
          if self.dictionary.end_idx in gt_text:
              gt_text = gt_text[
                  : gt_text.index(self.dictionary.end_idx)
              ]
          new_gt_texts.append(self.dictionary.idx2str(gt_text))
      results["gt_texts"] = new_gt_texts
      return results
  
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 2 for calling the ConvertText obj's underlying member method code with example usage: obj.transform(results) and returns: results