def METHOD_NAME(f=None, has_trans=False, status_code=200):
    def decorator(func):
        @functools.wraps(func)
        def wrapper(*args, **kw):
            response = func(*args, **kw)
            if isinstance(response, http.HttpResponse):
                return response
            else:
                return json_response(
                    response, has_trans=has_trans, status_code=status_code
                )
        return wrapper
    if f:
        return decorator(f)
    else:
        return decorator