code: def handle_scores_per_type(
      scores: Dict[str, Any],
      data: Dict[str, Any] = {},
      *,
      spans_key: str = "sc",
      silent: bool = False,
  ) -> Dict[str, Any]:
      msg = Printer(no_print=silent, pretty=not silent)
      if "morph_per_feat" in scores:
          if scores["morph_per_feat"]:
              print_prf_per_type(
                  msg, scores["morph_per_feat"], "MORPH", "feat"
              )
              data["morph_per_feat"] = scores["morph_per_feat"]
      if "dep_las_per_type" in scores:
          if scores["dep_las_per_type"]:
              print_prf_per_type(
                  msg, scores["dep_las_per_type"], "LAS", "type"
              )
              data["dep_las_per_type"] = scores["dep_las_per_type"]
      if "ents_per_type" in scores:
          if scores["ents_per_type"]:
              print_prf_per_type(
                  msg, scores["ents_per_type"], "NER", "type"
              )
              data["ents_per_type"] = scores["ents_per_type"]
      if f"spans_{spans_key}_per_type" in scores:
          if scores[f"spans_{spans_key}_per_type"]:
              print_prf_per_type(
                  msg,
                  scores[f"spans_{spans_key}_per_type"],
                  "SPANS",
                  "type",
              )
              data[f"spans_{spans_key}_per_type"] = scores[
                  f"spans_{spans_key}_per_type"
              ]
      if "cats_f_per_type" in scores:
          if scores["cats_f_per_type"]:
              print_prf_per_type(
                  msg, scores["cats_f_per_type"], "Textcat F", "label"
              )
              data["cats_f_per_type"] = scores["cats_f_per_type"]
      if "cats_auc_per_type" in scores:
          if scores["cats_auc_per_type"]:
              print_textcats_auc_per_cat(
                  msg, scores["cats_auc_per_type"]
              )
              data["cats_auc_per_type"] = scores["cats_auc_per_type"]
      return scores
  
file_path: spaCy/spacy/cli/evaluate.py
imports: import re
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Union
  import srsly
  from thinc.api import fix_random_seed
  from wasabi import Printer
  from ..None import displacy, util
  from ..scorer import Scorer
  from ..tokens import Doc
  from ..training import Corpus
  from ._util import Arg, Opt, app, benchmark_cli, import_code, setup_gpu
label_desc: Use image node_id 3 for calling a global function with example usage: handle_scores_per_type(scores, data) and returns: scores