code: def deserialize_metrics(metrics):
      deserialized = []
      for metric in metrics:
          if isinstance(metric, list):
              deserialized.append(metric[0])
          else:
              deserialized.append(keras.metrics.deserialize(metric))
      return deserialized
  
file_path: autokeras/autokeras/engine/head.py
imports: from typing import Optional
  from tensorflow import keras
  from autokeras.engine import io_hypermodel
  from autokeras.utils import types
label_desc: Use image node_id 2 for calling a global function with example usage: deserialize_metrics(metrics) and returns: deserialized