code: def eea_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(EE_triple0, result)
      new_record = []
      for m in matches:
          spt = m.split("\n")
          event_type, trigger, args = (
              clean(spt, 0),
              clean(spt, 1),
              clean(spt, -1),
          )
          if trigger == self.NAN or type == self.NAN:
              continue
          args_spt = args.split(";")
          args = []
          for it in args_spt:
              it = it.strip().split("#")
              role = it[0].strip()
              name = it[-1].strip()
              if role == self.NAN or name == self.NAN:
                  continue
              args.append((name, role))
          new_record.append((event_type, trigger, tuple(args)))
      return new_record
  
file_path: DeepKE/example/llm/InstructKGC/kg2instruction/eval/extracter/eea_extractor.py
imports: import re
label_desc: Use image node_id 4 for calling the EEAExtractor obj's underlying member method code with example usage: obj.eea_post_process0(text, result) and returns: new_record, s