def _GetCulpritInfo(analysis):
  """Returns a dict with information about the culprit git_hash.

  Args:
    analysis (MasterFlakeAnalysis): The master flake analysis the suspected
      flake build is associated with.

  Returns:
    A dict in the format:
      {
          'commit_position': int,
          'git_hash': str,
          'url': str,
      }
  """
  if analysis.culprit is None:
    return {}

  return {
      'commit_position': analysis.culprit.commit_position,
      'git_hash': analysis.culprit.revision,
      'url': analysis.culprit.url,
      'confidence': analysis.culprit.confidence,
  }