code: def save_scores(np_result, file_path):
      """
      Save the result of a topic extraction into a file
  
      Args:
          np_result: A list of topics with different score types (tfidf, cvalue, freq)
          file_path: The output file path
      """
      logger.info(
          "saving multi-scores np extraction results to: %s", file_path
      )
      with open(
          file_path, "wt", encoding="utf-8", newline=""
      ) as csv_file:
          writer = csv.writer(csv_file, delimiter=",")
          ctr = 0
          for group, tfidf, cvalue, freq in np_result:
              try:
                  group_str = ""
                  for p in group:
                      group_str += p + ";"
                  row = (
                      group_str[0:-1],
                      str(tfidf),
                      str(cvalue),
                      str(freq),
                  )
                  writer.writerow(row)
                  ctr += 1
              except Exception as e:
                  logger.error(
                      "Error while writing np results. iteration #: %s. Error: %s",
                      str(ctr),
                      str(e),
                  )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import argparse
  import csv
  import logging
  import os
  import sys
  from multiprocessing import Pool
  from os import makedirs, path
  from nlp_architect import LIBRARY_OUT
  from nlp_architect.utils.embedding import FasttextEmbeddingsModel
  from nlp_architect.utils.io import validate_existing_directory
  from nlp_architect.utils.text import SpacyInstance
  from .np_scorer import NPScorer
label_desc: Use image node_id 4 for calling a global function with example usage: save_scores(np_result, file_path) without return types