code: def result_to_plot(folder_name=None):
      """
      Loads results.json file in the ../stats_graphs/folder_name, and plot f1 vs epoch.
      Use for debugging purposes, or in case the program stopped due to error in plot_f1_vs_epoch.
      """
      stats_graph_folder = os.path.join(".", "stats_graphs")
      if folder_name == None:
          # Getting a list of all subdirectories in the current directory. Not recursive.
          subfolders = os.listdir(stats_graph_folder)
      else:
          subfolders = [folder_name]
  
      for subfolder in subfolders:
          subfolder_filepath = os.path.join(
              stats_graph_folder, subfolder
          )
          result_filepath = os.path.join(
              stats_graph_folder, subfolder, "results.json"
          )
          if not os.path.isfile(result_filepath):
              continue
          result = json.load(open(result_filepath, "r"))
          for metric in ["accuracy_score", "f1_score"]:
              plot_f1_vs_epoch(
                  result, subfolder_filepath, metric, from_json=True
              )
  
file_path: NeuroNER/neuroner/evaluate.py
imports: import json
  import os
  import pkg_resources
  import time
  import numpy
  import matplotlib.pyplot
  import sklearn.metrics
  from neuroner import utils_plots
  from neuroner import utils_nlp
label_desc: Use image node_id 4 for calling a global function with example usage: result_to_plot(folder_name) without return types