def GetTriageResultsFromCrashes(crashes):  # pragma: no cover.
  """Check those triaged crash in ``crashes`` and return the triaged culprits.

  Args:
    crashes (dict): A dict mapping ``crash_id`` to ``CrashAnalysis`` entities.

  Returns:
    A dict mapping from ``crash_id`` to its culprit results, like culprit_cls,
    culprit_regression_range or culprit_components.
  """
  triage_results = {}
  for crash_id, crash in crashes.iteritems():
    triage_result = {}
    if crash.culprit_cls:
      triage_result['culprit_cls'] = crash.culprit_cls
    if crash.culprit_regression_range:
      triage_result[
          'culprit_regression_range'] = crash.culprit_regression_range
    if crash.culprit_components:
      triage_result['culprit_components'] = crash.culprit_components

    triage_results[crash_id] = triage_result

  return triage_results