def get_serializer(self, instance=None, data=None,<EOL>many=False, partial=False):
serializers = {<EOL>'<STR_LIT>': NodeRequestListSerializer,<EOL>'<STR_LIT>': VoteRequestListSerializer,<EOL>'<STR_LIT>': CommentRequestListSerializer,<EOL>'<STR_LIT>': RatingRequestListSerializer,<EOL>}<EOL>context = self.get_serializer_context()<EOL>service_code = context['<STR_LIT>'].query_params.get('<STR_LIT>', '<STR_LIT>')<EOL>if service_code not in serializers.keys():<EOL><INDENT>serializer_class = self.get_serializer_class()<EOL><DEDENT>else:<EOL><INDENT>serializer_class = serializers[service_code]<EOL><DEDENT>return serializer_class(instance, many=many, partial=partial, context=context)<EOL>
Return the serializer instance that should be used for validating and
deserializing input, and for serializing output.