def compute_collection_contributors_summary(collection_id):
 snapshots_metadata = get_collection_snapshots_metadata(collection_id)
 current_version = len(snapshots_metadata)
 contributors_summary = collections.defaultdict(int)
 while True:
  snapshot_metadata = snapshots_metadata[(current_version - 1)]
  committer_id = snapshot_metadata['committer_id']
  is_revert = (snapshot_metadata['commit_type'] == 'revert')
  if ((not is_revert) and (committer_id not in feconf.SYSTEM_USER_IDS)):
   contributors_summary[committer_id] += 1
  if (current_version == 1):
   break
  if is_revert:
   current_version = snapshot_metadata['commit_cmds'][0]['version_number']
  else:
   current_version -= 1
 return contributors_summary

def compute_collection_contributors_summary ( collection_id ) : snapshots_metadata = get_collection_snapshots_metadata ( collection_id ) current_version = len ( snapshots_metadata ) contributors_summary = collections . defaultdict ( int ) while True : snapshot_metadata = snapshots_metadata [ ( current_version - 1 ) ] committer_id = snapshot_metadata [ 'committer_id' ] is_revert = ( snapshot_metadata [ 'commit_type' ] == 'revert' ) if ( ( not is_revert ) and ( committer_id not in feconf . SYSTEM_USER_IDS ) ) : contributors_summary [ committer_id ] += 1 if ( current_version == 1 ) : break if is_revert : current_version = snapshot_metadata [ 'commit_cmds' ] [ 0 ] [ 'version_number' ] else : current_version -= 1 return contributors_summary
computes the contributors summary for a given collection .