code: def ner_post_process0(self, text, result):
      def clean(spt, i):
          try:
              s = spt[i].strip()
          except IndexError:
              s = ""
          if i == 0 and len(s) != 0 and s[0] == "(":
              s = s[1:]
          if i == -1 and len(s) != 0 and s[-1] == ")":
              s = s[:-1]
          return s
  
      matches = re.findall(NER_triple0, result)
      new_record = []
      for m in matches:
          spt = m.split(",")
          entity, type = clean(spt, 0), clean(spt, -1)
          if entity == "" or type == "":
              continue
          if entity == self.NAN or type == self.NAN:
              continue
          new_record.append((entity, type))
  
      return new_record
  
file_path: DeepKE/example/llm/InstructKGC/kg2instruction/eval/extracter/ner_extractor.py
imports: import re
label_desc: Use image node_id 4 for calling the NERExtractor obj's underlying member method code with example usage: obj.ner_post_process0(text, result) and returns: new_record, s