import pickle


def _deserialize_metrics_raw(serialized):
  """Deserializes metrics serialized with _serialize_metrics.

  Returns the "raw" serialized final dictionary, including the version and
  other metadata. Metrics can be extracted from the _SLICE_METRICS_LIST_KEY key.

  Args:
    serialized: Metrics serialized with _serialize_metrics

  Returns:
    "Raw" serialized final dictionary.
  """
  return pickle.loads(serialized)