def METHOD_NAME(func):
    def _decorated(view, request, *args, **kwargs):
        if not config.ENABLE_TERMS_AND_CONDITIONS:
            error_msg = 'terms and conditions not enabled.'
            return api_error(status.HTTP_404_NOT_FOUND, error_msg)
        return func(view, request, *args, **kwargs)
    return _decorated