In this example, we first check if the user is logged in by checking if the `loggedInUser` variable is set in the `$_SESSION` array. If it is set, we call the `getLoggedInUser` function to retrieve the username and display a welcome message. If the user is not logged in, we display a message asking the user to log in first. The `getLoggedInUser` function simply retrieves the username from the `$_SESSION` array and returns it. This function assumes that the `loggedInUser` variable has already been set in the `$_SESSION` array when the user logs in. The `getLoggedInUser` function does not belong to a specific package library but is a standard PHP function used in many authentication systems.