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 = 0
      hyp_intent_arr = []
      ref_intent_arr = []
      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]
          )
          hyp_intent_arr.append(hyp_intent)
          ref_intent_arr.append(ref_intent)
          # if hyp_intent != ref_intent:
          #     error += 1
          # print(hyp_intent)
          # print(ref_intent)
  
      return f1_score(
          ref_intent_arr, hyp_intent_arr, average="weighted"
      )
  
imports: import argparse
  import os
  import re
  import sys
  import pandas
  from sklearn.metrics import f1_score
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: f1_score