def _OrganizeTryJobResultByCulprits(try_job_culprits):
  """Re-organize try job culprits by revision.

  Args:
    try_job_culprits (dict): A dict of culprits for one step organized by test:
        {
            'tests': {
                'a_test1': {
                    'revision': 'rev1',
                    'commit_position': '1',
                    'review_url': 'url_1'
                },
                'a_test2': {
                    'revision': 'rev1',
                    'commit_position': '1',
                    'review_url': 'url_1'
                }
            }
        }
  Returns:
    A dict of culprits for one step organized by revison:
        {
            'rev1': {
                'revision': 'rev1',
                'commit_position': '1',
                'review_url': 'url_1',
                'tests': ['a_test1', 'a_test2']
            }
        }
  """
  if not try_job_culprits or not try_job_culprits.get('tests'):
    return {}

  organized_culprits = {}
  for test_name, culprit in try_job_culprits['tests'].iteritems():
    revision = culprit['revision']
    if organized_culprits.get(revision):
      organized_culprits[revision]['failed_tests'].append(test_name)
    else:
      organized_culprits[revision] = culprit
      organized_culprits[revision]['failed_tests'] = [test_name]

  return organized_culprits