code: def _resolve_metrics_metadata(self):
      def get_metrics(prefix, metric_type):
          is_valid = lambda key, val: isinstance(
              val, (type(None), bool, float, int)
          ) and not str(key).endswith("checksum")
          items = self._model_json["output"][
              metric_type
          ]._metric_json.items()
          return {
              prefix + str(key): _to_storage_value(val)
              for key, val in items
              if is_valid(key, val)
          }
  
      output = self._model_json["output"]
      metrics = get_metrics(
          "h2o3/metrics/training/", "training_metrics"
      )
      if output["validation_metrics"]:
          validation_metrics = get_metrics(
              "h2o3/metrics/validation/", "validation_metrics"
          )
          metrics = dict(metrics, **validation_metrics)
      if output["cross_validation_metrics"]:
          cross_validation_metrics = get_metrics(
              "h2o3/metrics/cross_validation/",
              "cross_validation_metrics",
          )
          metrics = dict(metrics, **cross_validation_metrics)
      return metrics
  
imports: import h2o.h2o
  from .connect import *
  from .utils import *
  from .status import _is_model_published
  from .deploy import deploy
  import warnings
  import os
  import mimetypes
  import h2o_mlops_client
  import h2o_cloud_extensions
label_desc: Use image node_id 8 for calling a global function with example usage: _resolve_metrics_metadata() and returns: metrics, unknown