def METHOD_NAME(self):
    if self.action in ['list', 'retrieve', 'destroy']:
        return serializers.GoodsunitGetSerializer
    elif self.action in ['create']:
        return serializers.GoodsunitPostSerializer
    elif self.action in ['update']:
        return serializers.GoodsunitUpdateSerializer
    elif self.action in ['partial_update']:
        return serializers.GoodsunitPartialUpdateSerializer
    else:
        return self.http_method_not_allowed(request=self.request)