def METHOD_NAME(aws_client):
    def _factory(rest_api_id: str, stage_name: str):
        deployment_id = aws_client.apigateway.create_deployment(restApiId=rest_api_id)["id"]
        aws_client.apigateway.update_stage(
            restApiId=rest_api_id,
            stageName=stage_name,
            patchOperations=[{"op": "replace", "path": "/deploymentId", "value": deployment_id}],
        )
    return _factory