code: def get_classification_result(
      hyp_file, ref_file, hyp_write, ref_write
  ):
      hyp_lines = [line for line in hyp_file]
      ref_lines = [line for line in ref_file]
  
      error_dict = {}
      total_dict = {}
      for line_count in range(len(hyp_lines)):
          hyp_intent = (
              hyp_lines[line_count].split("\t")[0].split(" ")[0]
          )
          ref_intent = (
              ref_lines[line_count].split("\t")[0].split(" ")[0]
          )
          if ref_intent not in total_dict:
              total_dict[ref_intent] = 0
              error_dict[ref_intent] = 0
          if hyp_intent != ref_intent:
              error_dict[ref_intent] += 1
          total_dict[ref_intent] += 1
          hyp_write.write(
              " ".join(
                  hyp_lines[line_count].split("\t")[0].split(" ")[1:]
              )
              + "\t"
              + hyp_lines[line_count].split("\t")[1]
          )
          ref_write.write(
              " ".join(
                  ref_lines[line_count].split("\t")[0].split(" ")[1:]
              )
              + "\t"
              + ref_lines[line_count].split("\t")[1]
          )
      acc_arr = []
      for intent in total_dict:
          print(intent)
          acc_arr.append(1 - (error_dict[intent] / total_dict[intent]))
          print(acc_arr[-1])
      return np.mean(acc_arr)
  
imports: import argparse
  import os
  import re
  import sys
  import numpy
  import pandas
label_desc: Use image node_id 1 for calling a global function with example usage: get_classification_result(hyp_file, ref_file, hyp_write, ref_write) and returns: np