def _human_dies(mobility_planner, human, activity, env):
    """
    Implements cleaning up of `human` object and setting up relevant flags before `human` timesout for infinity

    Args:
        mobility_planner (MobilityPlanner): schedule planning object
        human (covid19sim.human.Human): `human` object that needs to timeout for infinity (dies)
        activity (Activity): activity that human is about to do
        env (simpy.Environment): event scheduling object

    Returns:
        mobility_planner (MobilityPlanner): schedule planning object with relevant flags updated
        human (covid19sim.human.Human): `human` object that needs to timeout for infinity (dies)
        activity (Activity): activity with a flag to indicate `human` should be timedout for infinity
    """
    mobility_planner.death_timestamp = env.timestamp
    activity.human_dies = True
    if mobility_planner.location_of_hospitalization is not None:
        mobility_planner.location_of_hospitalization.discharge(human)
    mobility_planner.location_of_hospitalization = None
    return mobility_planner, human, activity