[Unreal] Example to Shutdown GameSession?

Is there somewhere an example on how to shutdown a gamesession, when after some time past no players are connected?

I would recommend looking into ProcessEnding.