def METHOD_NAME(request, setup_server):
    for marker in request.node.iter_markers("service"):
        data = marker.kwargs["data"]
        status = marker.kwargs["status"]
        method = marker.kwargs["method"]
        path = marker.kwargs["path"]
        # Use default args to bind variables early
        setup_server(lambda h, d=data, s=status: h.respond_with_json(d, status=s), method, path)