def METHOD_NAME(replicas, include_gateway, protocols):
    if replicas > 1 and not include_gateway:
        return
    with pytest.raises(RuntimeError):
        d = Deployment(
            replicas=replicas,
            protocol=protocols,
            include_gateway=include_gateway,
            shards=2,
        )
        with d:
            pass