code: def rte_post_process1_zh(self, text, result):
      def other_process(m):
          try:
              head = m.split(",关系是")[0].replace("头实体是", "").strip()
              rel = m.split(",关系是")[-1].split(",尾实体是")[0].strip()
              tail = m.split(",尾实体是")[-1].strip()
          except IndexError:
              return "", "", ""
          return head, rel, tail
  
      def clean(spt, i):
          try:
              s = spt[i].strip()
          except IndexError:
              s = ""
          if i == 0 and len(s) != 0:
              s = s.replace("头实体是", "")
          if i == 1 and len(s) != 0:
              s = s.replace("关系是", "")
          if i == -1 and len(s) != 0:
              s = s.replace("尾实体是", "")
          return s
  
      rst = self.replace_nomiss(result)
      matches = rst.split("\n")
      new_record = []
      for m in matches:
          if m.strip() == self.NAN:
              continue
          spt = m.split(",")
          if len(spt) > 3:
              head, rel, tail = other_process(m)
              print(
                  "rte_post_process1_zh", f"[{head} - {rel} - {tail}]"
              )
          else:
              head = clean(spt, 0)
              rel = clean(spt, 1)
              tail = clean(spt, -1)
          if head == "" or rel == "" or tail == "":
              continue
          if head == self.NAN or tail == self.NAN:
              continue
          new_record.append((head, rel, tail))
  
      return new_record
  
file_path: DeepKE/example/llm/InstructKGC/kg2instruction/eval/extracter/re_extractor.py
imports: import sys
  import re
label_desc: Use image node_id 5 for calling the REExtractor obj's underlying member method code with example usage: obj.rte_post_process1_zh(text, result) and returns: new_record, head,  rel,  tail, s, str,  str,  str