code: def save_metrics(classifier, metrics_dir, metrics):
      """
      Save a JSON-serialized version of a set of performance metrics for a
      particular classifier. The metrics will be stored at a path generated from
      the classifier's attributes.
      """
      path = make_save_path(metrics_dir, classifier, "metric")
      logger.info("Saving metrics in: %s" % path)
      with open(path, "w") as f:
          json.dump(metrics, f)
      return path
  
imports: from __future__ import absolute_import, unicode_literals
  import base64
  import hashlib
  import json
  import logging
  import os
  import pickle
  from builtins import str
  import numpy
  from atm.compat import getargs
label_desc: Use image node_id 13 for calling a global function with example usage: save_metrics(classifier, metrics_dir, metrics) and returns: path