<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_serializer_class(self, action=None):
 """ Return the serializer class depending on request method. Attribute of proper serializer should be defined. """

        if action is not None:
            return getattr(self, '%s_serializer_class' % action)
        else:
            return super(GenericViewSet, self).get_serializer_class()