def METHOD_NAME(self, request, agent_id, svcname):
    agent = get_object_or_404(Agent, agent_id=agent_id)
    data = {
        "func": "editwinsvc",
        "payload": {
            "name": svcname,
            "startType": request.data["startType"],
        },
    }
    r = asyncio.run(agent.nats_cmd(data, timeout=10))
    success, natserror, errormsg = process_nats_response(r)
    # response struct from agent: {success: bool, errormsg: string}
    if r == "timeout" or natserror:
        return notify_error("Unable to contact the agent")
    elif not success and errormsg:
        return notify_error(errormsg)
    elif success:
        return Response("The service start type was updated successfully")
    return notify_error("Something went wrong")