def METHOD_NAME(self, action=None):
    serializer_class = None
    if not action:
        action = self.action
    if hasattr(self.serializer_classes_tmp, action) and getattr(self.serializer_classes_tmp, action):
        serializer_class = getattr(self.serializer_classes_tmp, action)
    elif hasattr(self.serializer_classes, action):
        serializer_class = getattr(self.serializer_classes, action)
    if not serializer_class:
        raise NotImplementedError("'%s' should include `serializer_classes` attribute %s. "
                                  "Ex: SerializerClasses(%s='<serializer>')." % (self.__class__.__name__,
                                                                                 action, action))
    return serializer_class