code: def _load_gt_txt(self, gt_txt_path):
      if gt_txt_path is None:
          return None
  
      if not os.path.exists(gt_txt_path):
          if self.params.non_existing_as_empty:
              return ""
          else:
              raise Exception(
                  "Text file at '{}' does not exist".format(gt_txt_path)
              )
  
      try:
          with codecs.open(gt_txt_path, "r", "utf-8") as f:
              return f.read()
      except Exception as e:
          raise Exception(
              f"Could not read {gt_txt_path} as text file."
          ) from e
  
imports: import codecs
  import os
  from copy import deepcopy
  from dataclasses import dataclass, field
  from typing import List
  import numpy
  import logging
  from paiargparse import pai_dataclass, pai_meta
  from tfaip.data.pipeline.definitions import PipelineMode, INPUT_PROCESSOR
  from calamari_ocr.ocr.dataset.datareader.base import CalamariDataGenerator, CalamariDataGeneratorParams, InputSample, SampleMeta
  from calamari_ocr.utils import split_all_ext, glob_all, keep_files_with_same_file_name
label_desc: Use image node_id 3 for calling the FileDataGenerator obj's underlying member method code with example usage: obj._load_gt_txt(gt_txt_path) and returns: None, str, f