code: def test_plotting_training_curves_and_weights(resources_path):
      plotter = Plotter()
      plotter.plot_training_curves(resources_path / "visual/loss.tsv")
      plotter.plot_weights(resources_path / "visual/weights.txt")
  
      # clean up directory
      (resources_path / "visual/weights.png").unlink()
      (resources_path / "visual/training.png").unlink()
  
file_path: flair/tests/test_visual.py
imports: from flair.data import Sentence, Span, Token
  from flair.embeddings import FlairEmbeddings
  from flair.visual import Highlighter
  from flair.visual.ner_html import HTML_PAGE, PARAGRAPH, TAGGED_ENTITY, render_ner_html
  from flair.visual.training_curves import Plotter
label_desc: Use image node_id 2 for calling a global function with example usage: test_plotting_training_curves_and_weights(resources_path) without return types