class SerializerVotesFieldMixin(serializers.Serializer):
    '''
    Adds fields 'votes' for hyperlinked API of comments to a given object
    '''
    user_vote = serializers.SerializerMethodField()
    votes_score_avg = serializers.SerializerMethodField()
    votes_count = serializers.SerializerMethodField()
    votes_score_distribution = serializers.SerializerMethodField()

    def get_user_vote(self, obj):
        context = getattr(self, 'context')