code: def generate_label(predict, label_file, offset):
      import os
  
      if not os.path.exists(label_file):
          return predict
  
      with open(label_file, "r") as f:
          labels = [l.rstrip() for l in f]
  
      ret = []
      for i, j in predict:
          ret.append((labels[i - offset], i, j))
  
      return ret
  
label_desc: Use image node_id 1 for calling a global function with example usage: generate_label(predict, label_file, offset) and returns: ret, predict