def convert_emotion_metric_entity_to_dict(e_metric):
  """Convert a datastore EmotionMetric entity into a dictionary.

  Args:
    e_metric: an EmotionMetric datastore entity.

  Returns:
    A dictionary with keys as emotions and values are confidences
  """
  e_dict = {}
  e_dict['amusement'] = e_metric.amusement
  e_dict['anger'] = e_metric.anger
  e_dict['concentration'] = e_metric.concentration
  e_dict['contentment'] = e_metric.contentment
  e_dict['desire'] = e_metric.desire
  e_dict['disappointment'] = e_metric.disappointment
  e_dict['elation'] = e_metric.elation
  e_dict['disgust'] = e_metric.disgust
  e_dict['embarrassment'] = e_metric.embarrassment
  e_dict['interest'] = e_metric.interest
  e_dict['pride'] = e_metric.pride
  e_dict['sadness'] = e_metric.sadness
  e_dict['surprise'] = e_metric.surprise
  e_dict['time_since_sample_displayed'] = e_metric.time_since_sample_displayed
  e_dict['experiment_name'] = e_metric.experiment_name
  e_dict['experiment_description'] = e_metric.experiment_description
  e_dict['ID'] = e_metric.key.id()
  return e_dict