What is the most critical immediate action a jail officer should take upon discovering an inmate attempting to hang themselves?