code: def update_meta(
      training: Union[Dict[str, Any], Config],
      nlp: "Language",
      info: Dict[str, Any],
  ) -> None:
      nlp.meta["performance"] = {}
      for metric in training["score_weights"]:
          if metric is not None:
              nlp.meta["performance"][metric] = info[
                  "other_scores"
              ].get(metric, 0.0)
      for pipe_name in nlp.pipe_names:
          if pipe_name in info["losses"]:
              nlp.meta["performance"][f"{pipe_name}_loss"] = info[
                  "losses"
              ][pipe_name]
  
file_path: spacy/spacy/training/loop.py
imports: import random
  import shutil
  import sys
  from pathlib import Path
  from timeit import default_timer
  from typing import IO, TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Optional, Tuple, Union
  from thinc.api import Config, Optimizer, constant, fix_random_seed, set_gpu_allocator
  from wasabi import Printer
  from ..errors import Errors
  from ..schemas import ConfigSchemaTraining
  from ..util import logger, registry, resolve_dot_names
  from .example import Example
label_desc: Use image node_id 6 for calling a global function with example usage: update_meta(training, nlp, info) without return types