code: def _update_metrics(metrics_dict, metric, params, result):
      logger.debug("%s@%d = %g", metric, params["k"], result)
      if metric == params["primary_metric"]:
          metrics_dict["default"] = result
      else:
          metrics_dict[metric] = result
      return metrics_dict
  
file_path: recommenders/recommenders/tuning/nni/ncf_training.py
imports: import argparse
  import json
  import logging
  import numpy
  import os
  import pandas
  import nni
  import recommenders.evaluation.python_evaluation
  from recommenders.models.ncf.ncf_singlenode import NCF
  from recommenders.models.ncf.dataset import Dataset
  from recommenders.utils.constants import SEED
label_desc: Use image node_id 1 for calling a global function with example usage: _update_metrics(metrics_dict, metric, params, result) and returns: metrics_dict