def METHOD_NAME(collection):
    surveys = models.CollectionSurvey.objects.filter(collection=collection)
    score = calculate_survey_score(surveys)
    collection.community_score = score
    collection.community_survey_count = len(surveys)
    collection.save()
    # TODO(newswangerd): make logger work on collections
    # namespace = repo.provider_namespace.namespace.name
    #
    # fields = {
    #     'content_name': '{}.{}'.format(namespace, repo.name),
    #     'content_id': repo.id,
    #     'community_score': repo.community_score,
    #     'quality_score': repo.quality_score,
    # }
    #
    # serializers.influx_insert_internal({
    #     'measurement': 'content_score',
    #     'fields': fields
    # })